remove dead code
This commit is contained in:
parent
42efc3f25a
commit
6c984f4512
1 changed files with 0 additions and 20 deletions
|
|
@ -111,26 +111,6 @@ func NewCmdSet(f *cmdutil.Factory, runF func(*SetOptions) error) *cobra.Command
|
|||
|
||||
cmd.Flags().BoolVarP(&opts.IsShell, "shell", "s", false, "Declare an alias to be passed through a shell interpreter")
|
||||
|
||||
opts.validCommand = func(args string) bool {
|
||||
split, err := shlex.Split(args)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
rootCmd := cmd.Root()
|
||||
cmd, _, err := rootCmd.Traverse(split)
|
||||
if err == nil && cmd != rootCmd {
|
||||
return true
|
||||
}
|
||||
|
||||
for _, ext := range f.ExtensionManager.List() {
|
||||
if ext.Name() == split[0] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue