From 5facfd32805831230f9b42b7ec9765e858b553a8 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Thu, 4 Apr 2019 18:45:19 -0500 Subject: 44200 (tweaked): Completion: Append to precommands in _normal --- Completion/Zsh/Command/_builtin | 4 +--- Completion/Zsh/Command/_command | 5 +---- Completion/Zsh/Command/_exec | 4 +--- Completion/Zsh/Command/_precommand | 5 +---- 4 files changed, 4 insertions(+), 14 deletions(-) (limited to 'Completion/Zsh/Command') diff --git a/Completion/Zsh/Command/_builtin b/Completion/Zsh/Command/_builtin index a77af9879..ffb7b8c8d 100644 --- a/Completion/Zsh/Command/_builtin +++ b/Completion/Zsh/Command/_builtin @@ -1,11 +1,9 @@ #compdef builtin -precommands+=(builtin) - if (( $CURRENT > 2 )); then shift words (( CURRENT -- )) - _normal + _normal -p $service else local expl diff --git a/Completion/Zsh/Command/_command b/Completion/Zsh/Command/_command index 4e2858676..7a59a2386 100644 --- a/Completion/Zsh/Command/_command +++ b/Completion/Zsh/Command/_command @@ -1,11 +1,8 @@ #compdef command -# indicate if this is a precommand modifier -[[ $service = command ]] && precommands+=(command) - _arguments \ '-v[indicate result of command search]:*:command:_path_commands' \ '-V[show result of command search in verbose form]:*:command:_path_commands' \ '(-)-p[use default PATH to find command]' \ ':command:_path_commands' \ - '*::arguments: _normal' + '*:: : _normal -p $service' diff --git a/Completion/Zsh/Command/_exec b/Completion/Zsh/Command/_exec index 8de341a02..2498b57c0 100644 --- a/Completion/Zsh/Command/_exec +++ b/Completion/Zsh/Command/_exec @@ -1,9 +1,7 @@ #compdef exec -[[ $service == exec ]] && precommands+=( exec ) - _arguments -s -S -A '-*' : \ '-a+[set argv\[0\] to specified string]:argv[0] string' \ '-c[clear environment]' \ '-l[simulate login shell (prepend - to argv\[0\])]' \ - '*:: : _normal' + '*:: : _normal -p $service' diff --git a/Completion/Zsh/Command/_precommand b/Completion/Zsh/Command/_precommand index c9eef78af..fd88074c0 100644 --- a/Completion/Zsh/Command/_precommand +++ b/Completion/Zsh/Command/_precommand @@ -1,9 +1,6 @@ #compdef - nohup eval time rusage noglob nocorrect catchsegv aoss hilite eatmydata -# precommands is made local in _main_complete -precommands+=($words[1]) - shift words (( CURRENT-- )) -_normal +_normal -p $service -- cgit 1.4.1