fish-shell/share
ridiculousfish 06400b83b1 Support for command wrapping ("aliases")
Add the --wraps option to 'complete' and 'function'. This allows a
command to (recursively) inherit the completions of a wrapped command.
Fixes #393.

When evaluating a completion, we inspect the entire "wrap chain" for a
command, i.e. we follow the sequence of wrapping until we either hit a
loop (which we silently ignore) or the end of the chain. We then
evaluate completions as if the wrapping command were substituted with
the wrapped command. Currently this only works for commands, i.e.
'complete --command gco --wraps git\ checkout' won't work (that would
seem to encroaching on abbreviations anyways). It might be useful to
show an error message for that case.

The commandline builtin reflects the commandline with the wrapped
command substituted in, so e.g. git completions (which inspect the
command line) will just work. This sort of command line munging is
also performed by 'complete -C' so it's not totally without precedent.

'alias will also now mark its generated function as wrapping the
'target.
2014-08-15 18:14:36 -07:00
..
completions Use sgrep instead of grep in ssh completion 2014-08-13 01:06:15 -07:00
functions Support for command wrapping ("aliases") 2014-08-15 18:14:36 -07:00
tools Authenticate connections to web_config service 2014-08-04 13:34:26 +08:00
config.fish Make fish install a command_not_found handler in non-interactive uses. 2014-02-20 10:26:57 -08:00