completions/set: fix quoting error

This commit is contained in:
Johannes Altmanninger 2021-07-23 22:01:39 +02:00
parent 72fd328ad2
commit 6c0af841e2

View file

@ -86,15 +86,15 @@ complete -c set -n "fish_is_nth_token 1" -l unpath -d "Make variable not as a pa
#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_nth_token 1"; 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_nth_token 1"; 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_nth_token 1"; 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_nth_token 1; 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_nth_token 1; 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_nth_token 1; 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 some fish configuration variables even if they aren't set.
complete -c set -n '"fish_is_nth_token 1"; and not __fish_seen_argument -s e -l erase' -x -a "(__fish_set_special_vars)"
complete -c set -n 'fish_is_nth_token 1; and not __fish_seen_argument -s e -l erase' -x -a "(__fish_set_special_vars)"
# Complete scope-specific variables
complete -c set -n '"fish_is_nth_token 1"; and __fish_seen_argument -s l -l local' -x -a "(set -l | string replace ' ' \t'Local Variable: ')"
complete -c set -n '"fish_is_nth_token 1"; and __fish_seen_argument -s g -l global' -x -a "(set -g | string replace ' ' \t'Global Variable: ')"
complete -c set -n '"fish_is_nth_token 1"; and __fish_seen_argument -s U -l universal' -x -a "(set -U | string replace ' ' \t'Universal Variable: ')"
complete -c set -n 'fish_is_nth_token 1; and __fish_seen_argument -s l -l local' -x -a "(set -l | string replace ' ' \t'Local Variable: ')"
complete -c set -n 'fish_is_nth_token 1; and __fish_seen_argument -s g -l global' -x -a "(set -g | string replace ' ' \t'Global Variable: ')"
complete -c set -n 'fish_is_nth_token 1; and __fish_seen_argument -s U -l universal' -x -a "(set -U | string replace ' ' \t'Universal Variable: ')"
# Complete using preexisting variable names for `set --erase`
complete -c set -n '__fish_seen_argument -s e -l erase; and not __fish_seen_argument -s l -s U -s g -l local -l global -l Universal' -f -a "(set -g | string replace ' ' \tGlobal\ Variable:\ )"