mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 08:51:14 -03:00
Teach alias about wrap argument injection
Update the alias function to pass arguments to 'wraps'. For example alias gco='git checkout' now works like it ought to.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
logmsg Completion Wrappers
|
||||
|
||||
function complete_test_alpha1; echo $argv; end
|
||||
|
||||
complete -c complete_test_alpha1 --no-files -a '(commandline)'
|
||||
complete -c complete_test_alpha2 --no-files -w 'complete_test_alpha1 extra1'
|
||||
complete -c complete_test_alpha3 --no-files -w 'complete_test_alpha2 extra2'
|
||||
@@ -7,3 +9,13 @@ complete -c complete_test_alpha3 --no-files -w 'complete_test_alpha2 extra2'
|
||||
complete -C'complete_test_alpha1 arg1 '
|
||||
complete -C'complete_test_alpha2 arg2 '
|
||||
complete -C'complete_test_alpha3 arg3 '
|
||||
|
||||
logmsg Alias Completions
|
||||
|
||||
alias myalias1 'complete_test_alpha1 arg1'
|
||||
alias myalias2='complete_test_alpha1 arg2'
|
||||
|
||||
myalias1 call1
|
||||
myalias2 call2
|
||||
complete -C'myalias1 call3 '
|
||||
complete -C'myalias2 call3 '
|
||||
Reference in New Issue
Block a user