dont parse args for the ssh kitten as it will do so itself
This commit is contained in:
parent
46367bceed
commit
590c1bd7ad
@ -35,6 +35,8 @@ type Command struct {
|
||||
StopCompletingAtArg int
|
||||
// Consider all args as non-options args
|
||||
OnlyArgsAllowed bool
|
||||
// Pass through all args, useful for wrapper commands
|
||||
IgnoreAllArgs bool
|
||||
// Specialised arg aprsing
|
||||
ParseArgsForCompletion func(cmd *Command, args []string, completions *Completions)
|
||||
|
||||
|
||||
@ -13,6 +13,10 @@ func (self *Command) parse_args(ctx *Context, args []string) error {
|
||||
args_to_parse := make([]string, len(args))
|
||||
copy(args_to_parse, args)
|
||||
ctx.SeenCommands = append(ctx.SeenCommands, self)
|
||||
if self.IgnoreAllArgs {
|
||||
self.Args = args
|
||||
return nil
|
||||
}
|
||||
|
||||
var expecting_arg_for *Option
|
||||
options_allowed := true
|
||||
|
||||
@ -22,4 +22,5 @@ func specialize_command(ssh *cli.Command) {
|
||||
ssh.Usage = "arguments for the ssh command"
|
||||
ssh.ShortDescription = "Truly convenient SSH"
|
||||
ssh.HelpText = "The ssh kitten is a thin wrapper around the ssh command. It automatically enables shell integration on the remote host, re-uses existing connections to reduce latency, makes the kitty terminfo database available, etc. It's invocation is identical to the ssh command. For details on its usage, see :doc:`/kittens/ssh`."
|
||||
ssh.IgnoreAllArgs = true
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user