refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec handling core logic so people won't be confused by the core logic inside the commands folder (cleaner I guess) - Regen docs
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
package text
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "grep",
|
||||
Description: "search text in files",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-r", Description: "recursive"},
|
||||
{Name: "-R", Description: "recursive + follow symlinks"},
|
||||
{Name: "-i", Description: "ignore case"},
|
||||
@@ -38,11 +38,11 @@ func init() {
|
||||
})
|
||||
|
||||
// egrep and fgrep aliases
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "egrep",
|
||||
Description: "grep with extended regex",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-r", Description: "recursive"},
|
||||
{Name: "-i", Description: "ignore case"},
|
||||
{Name: "-n", Description: "show line numbers"},
|
||||
|
||||
Reference in New Issue
Block a user