mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Prevent error in acidhub prompt by quoting the regex
string errors if this regex isn't quoted. This results in this error: http://stackoverflow.com/questions/40942185/fish-shell-init-git-repo-yields-constant-terminal-output-after-every-command Signed-off-by: Tim Smith <tsmith@chef.io>
This commit is contained in:
parent
47b78b9eeb
commit
1a1a9b9927
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ function fish_prompt -d "Write out the prompt"
|
||||||
if [ (_git_branch_name) ]
|
if [ (_git_branch_name) ]
|
||||||
set -l git_branch (set_color -o blue)(_git_branch_name)
|
set -l git_branch (set_color -o blue)(_git_branch_name)
|
||||||
if [ (_is_git_dirty) ]
|
if [ (_is_git_dirty) ]
|
||||||
for i in (git branch -qv --no-color | string match -r \* | cut -d' ' -f4- | cut -d] -f1 | tr , \n)\
|
for i in (git branch -qv --no-color | string match -r '\*' | cut -d' ' -f4- | cut -d] -f1 | tr , \n)\
|
||||||
(git status --porcelain | cut -c 1-2 | uniq)
|
(git status --porcelain | cut -c 1-2 | uniq)
|
||||||
switch $i
|
switch $i
|
||||||
case "*[ahead *"
|
case "*[ahead *"
|
||||||
|
|
Loading…
Reference in a new issue