mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-18 18:02:47 +08:00
Make manual and completions reflect the facty that any combination od set_color params are valid values for $fish_color_* variables
darcs-hash:20060117193450-ac50b-636c59494399d88151174ee28096d93c0bcdd16d.gz
This commit is contained in:
parent
aa783fc657
commit
509b3598f7
|
@ -925,11 +925,15 @@ fish_color_substitution, \c fish_color_redirection, \c fish_color_end,
|
|||
\c fish_color_error, \c fish_color_param, \c fish_color_comment, \c
|
||||
fish_color_match, \c fish_color_search_match, \c fish_color_cwd, \c
|
||||
fish_pager_color_prefix, \c fish_pager_color_completion, \c
|
||||
fish_pager_color_description and \c fish_pager_color_progress. Valid
|
||||
values are \c black, \c red, \c green, \c brown, \c yellow, \c blue,
|
||||
\c magenta, \c purple, \c cyan, \c white or \c normal. Setting one of
|
||||
the above variables to normal will mean that the text color will be
|
||||
set to the default foreground color for the terminal.
|
||||
fish_pager_color_description and \c
|
||||
fish_pager_color_progress. Usually, the value of these variables will
|
||||
be one of \c black, \c red, \c green, \c brown, \c yellow, \c blue, \c
|
||||
magenta, \c purple, \c cyan, \c white or \c normal, but they can be an
|
||||
array containing any color options for the set_color command.
|
||||
|
||||
Issuing <code>set fish_color_error black --background=red
|
||||
--bold</code> will make all commandline errors be written in a black,
|
||||
bold font, with a red background.
|
||||
|
||||
\subsection prompt Programmable prompt
|
||||
|
||||
|
|
|
@ -58,20 +58,25 @@ end
|
|||
# Completions
|
||||
#
|
||||
|
||||
complete -c set -s e -l erase -d (_ "Erase variable")
|
||||
complete -c set -s x -l export -d (_ "Export variable to subprocess")
|
||||
complete -c set -s u -l unexport -d (_ "Do not export variable to subprocess")
|
||||
complete -c set -s g -l global -d (_ "Make variable scope global")
|
||||
complete -c set -s l -l local -d (_ "Make variable scope local")
|
||||
complete -c set -s U -l universal -d (_ "Make variable scope universal, i.e. share variable with all the users fish processes on this computer")
|
||||
complete -c set -s q -l query -d (_ "Test if variable is defined")
|
||||
complete -c set -s h -l help -d (_ "Display help and exit")
|
||||
# Regular switches, set only accepts these before the variable name,
|
||||
# so we need to test using __fish_is_first_token
|
||||
|
||||
# Complete using preexisting variables
|
||||
complete -c set -n '__fish_is_first_token' -s e -l erase -d (_ "Erase variable")
|
||||
complete -c set -n '__fish_is_first_token' -s x -l export -d (_ "Export variable to subprocess")
|
||||
complete -c set -n '__fish_is_first_token' -s u -l unexport -d (_ "Do not export variable to subprocess")
|
||||
complete -c set -n '__fish_is_first_token' -s g -l global -d (_ "Make variable scope global")
|
||||
complete -c set -n '__fish_is_first_token' -s l -l local -d (_ "Make variable scope local")
|
||||
complete -c set -n '__fish_is_first_token' -s U -l universal -d (_ "Make variable scope universal, i.e. share variable with all the users fish processes on this computer")
|
||||
complete -c set -n '__fish_is_first_token' -s q -l query -d (_ "Test if variable is defined")
|
||||
complete -c set -n '__fish_is_first_token' -s h -l help -d (_ "Display help and exit")
|
||||
|
||||
# Complete using preexisting variable names
|
||||
complete -c set -n '__fish_is_first_token' -x -a "(set|sed -e 's/ /\tVariable: /')"
|
||||
|
||||
# Color completions
|
||||
complete -c set -n '__fish_set_is_color' -x -a '(set_color --print-colors)' -d (_ Color)
|
||||
complete -c set -n '__fish_set_is_color' -s b -l background -x -a '(set_color --print-colors)' -d (_ "Change background color")
|
||||
complete -c set -n '__fish_set_is_color' -s o -l bold -d (_ 'Make font bold')
|
||||
|
||||
# Locale completions
|
||||
complete -c set -n '__fish_is_first_token' -x -a '$__fish_locale_vars' -d 'Locale variable'
|
||||
|
|
Loading…
Reference in New Issue
Block a user