mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
completions/git: Allow aliases with whitespace in the command
Fixes #5412.
This commit is contained in:
parent
99ba07354a
commit
081e14fd21
1 changed files with 1 additions and 1 deletions
|
@ -445,7 +445,7 @@ end
|
||||||
# So instead, we store the aliases in global variables, named after the alias, containing the command.
|
# So instead, we store the aliases in global variables, named after the alias, containing the command.
|
||||||
# This is because alias:command is an n:1 mapping (an alias can only have one corresponding command,
|
# This is because alias:command is an n:1 mapping (an alias can only have one corresponding command,
|
||||||
# but a command can be aliased multiple times)
|
# but a command can be aliased multiple times)
|
||||||
git config -z --get-regexp 'alias\..*' | while read -lz alias command _
|
git config -z --get-regexp 'alias\..*' | while read -lz alias command
|
||||||
# Git aliases can contain chars that variable names can't - escape them.
|
# Git aliases can contain chars that variable names can't - escape them.
|
||||||
set alias (string replace 'alias.' '' -- $alias | string escape --style=var)
|
set alias (string replace 'alias.' '' -- $alias | string escape --style=var)
|
||||||
set -g __fish_git_alias_$alias $command
|
set -g __fish_git_alias_$alias $command
|
||||||
|
|
Loading…
Reference in a new issue