mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 07:34:32 +00:00
a step to remove __fish_sgrep per issue #2450
This commit is contained in:
parent
d48c872913
commit
9d25b52208
1 changed files with 4 additions and 4 deletions
|
@ -4,13 +4,13 @@ end
|
|||
|
||||
function __fish_complete_eselect_modules
|
||||
set -l sedregexp 's/^ ([a-zA-Z0-9_-]*)[ ]*/\1\t/g'
|
||||
__fish_eselect_cmd modules list | __fish_sgrep '^ ' | sed -r $sedregexp
|
||||
__fish_eselect_cmd modules list | string match -r '^ ' | sed -r $sedregexp
|
||||
end
|
||||
|
||||
function __fish_complete_eselect_actions
|
||||
set -l sedregexp 's/^ ([a-zA-Z0-9_-]*)[ ]*/\1\t/g'
|
||||
set -l cmdl (commandline -poc)
|
||||
__fish_eselect_cmd $cmdl[2..-1] usage | __fish_sgrep '^ [^ -]' | sed -r $sedregexp
|
||||
__fish_eselect_cmd $cmdl[2..-1] usage | string match -r '^ [^ -]' | sed -r $sedregexp
|
||||
end
|
||||
|
||||
function __fish_complete_eselect_action_options
|
||||
|
@ -31,7 +31,7 @@ function __fish_complete_eselect_action_options
|
|||
set -l findregexp '/^ '$cmdl[-1]'/,/^ [^ ]/p'
|
||||
|
||||
set cmdl[-1] usage
|
||||
__fish_eselect_cmd $cmdl[2..-1] | sed -n -re $findregexp | __fish_sgrep '^ --' | sed -re $parseregexp
|
||||
__fish_eselect_cmd $cmdl[2..-1] | sed -n -re $findregexp | string match -r '^ --' | sed -re $parseregexp
|
||||
end
|
||||
|
||||
function __fish_complete_eselect_php_actions
|
||||
|
@ -58,7 +58,7 @@ function __fish_complete_eselect_targets
|
|||
set cmdl[-1] list
|
||||
end
|
||||
|
||||
eselect --colour=no $cmdl[2..-1] | __fish_sgrep '^ [^ -]' | sed -r $sedregexp
|
||||
eselect --colour=no $cmdl[2..-1] | string match -r '^ [^ -]' | sed -r $sedregexp
|
||||
end
|
||||
|
||||
complete -c eselect -n "test (__fish_number_of_cmd_args_wo_opts) = 1" \
|
||||
|
|
Loading…
Reference in a new issue