mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
fish_svn_prompt: Stringify
This was the only remaining use of `grep` in functions/.
This commit is contained in:
parent
5859d205d8
commit
c5d5089871
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ function __fish_svn_prompt_parse_status --argument flag_status_string --descript
|
||||||
# resolve the name of the variable for the character representing the current status type
|
# resolve the name of the variable for the character representing the current status type
|
||||||
set -l flag_index (contains -i $flag_type $__fish_svn_prompt_flag_names)
|
set -l flag_index (contains -i $flag_type $__fish_svn_prompt_flag_names)
|
||||||
# check to see if the status string for this column contains the character representing the current status type
|
# check to see if the status string for this column contains the character representing the current status type
|
||||||
if test (echo $flag_status_string | grep -c $__fish_svn_prompt_chars[$flag_index]) -eq 1
|
if test (count (string match $__fish_svn_prompt_chars[$flag_index] -- $flag_status_string)) -eq 1
|
||||||
# if it does, then get the names of the variables for the display character and colour to format it with
|
# if it does, then get the names of the variables for the display character and colour to format it with
|
||||||
set -l flag_var_display __fish_svn_prompt_char_{$flag_type}_display
|
set -l flag_var_display __fish_svn_prompt_char_{$flag_type}_display
|
||||||
set -l flag_var_color __fish_svn_prompt_char_{$flag_type}_color
|
set -l flag_var_color __fish_svn_prompt_char_{$flag_type}_color
|
||||||
|
|
Loading…
Reference in a new issue