mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 02:27:28 +08:00
set completions: complete __ variables
Now that __ stuff is sorted after a-z, we should not completely omit them from completions.
This commit is contained in:
parent
6b52b0994c
commit
f4e40f2f4b
|
@ -72,9 +72,9 @@ complete -c set -n '__fish_is_first_token' -s S -l show -d "Show variable"
|
|||
#TODO: add CPP code to generate list of read-only variables and exclude them from the following completions
|
||||
|
||||
# Complete using preexisting variable names
|
||||
complete -c set -n '__fish_is_first_token; and not __fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s g -s U -l local -l global -l universal' -x -a "(set -l | string match -rv '^__' | string replace ' ' \t'Local Variable: ')"
|
||||
complete -c set -n '__fish_is_first_token; and not __fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s g -s U -l local -l global -l universal' -x -a "(set -g | string match -rv '^__' | string replace ' ' \t'Global Variable: ')"
|
||||
complete -c set -n '__fish_is_first_token; and not __fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s g -s U -l local -l global -l universal' -x -a "(set -U | string match -rv '^__' | string replace ' ' \t'Universal Variable: ')"
|
||||
complete -c set -n '__fish_is_first_token; and not __fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s g -s U -l local -l global -l universal' -x -a "(set -l | string replace ' ' \t'Local Variable: ')"
|
||||
complete -c set -n '__fish_is_first_token; and not __fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s g -s U -l local -l global -l universal' -x -a "(set -g | string replace ' ' \t'Global Variable: ')"
|
||||
complete -c set -n '__fish_is_first_token; and not __fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s g -s U -l local -l global -l universal' -x -a "(set -U | string replace ' ' \t'Universal Variable: ')"
|
||||
# Complete scope-specific variables
|
||||
complete -c set -n '__fish_is_first_token; and __fish_seen_argument -s l -l local' -x -a "(set -l | string match -rv '^__' | string replace ' ' \t'Local Variable: ')"
|
||||
complete -c set -n '__fish_is_first_token; and __fish_seen_argument -s g -l global' -x -a "(set -g | string match -rv '^__' | string replace ' ' \t'Global Variable: ')"
|
||||
|
|
Loading…
Reference in New Issue
Block a user