From 376a4eca58fd0c16545548c4c4b87569521eeccc Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 28 Apr 2018 18:15:52 +0200 Subject: [PATCH] Remove ^ redirection from sample prompts A bunch of these did ^/dev/null. Replace it with 2>/dev/null. [ci skip] --- share/tools/web_config/sample_prompts/acidhub.fish | 4 ++-- .../web_config/sample_prompts/classic_vcs.fish | 8 ++++---- .../web_config/sample_prompts/robbyrussell.fish | 14 +++++++------- share/tools/web_config/sample_prompts/sorin.fish | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/share/tools/web_config/sample_prompts/acidhub.fish b/share/tools/web_config/sample_prompts/acidhub.fish index 24d675396..6d00ef901 100644 --- a/share/tools/web_config/sample_prompts/acidhub.fish +++ b/share/tools/web_config/sample_prompts/acidhub.fish @@ -4,10 +4,10 @@ function fish_prompt -d "Write out the prompt" set laststatus $status function _git_branch_name - echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||') + echo (git symbolic-ref HEAD 2>/dev/null | sed -e 's|^refs/heads/||') end function _is_git_dirty - echo (git status -s --ignore-submodules=dirty ^/dev/null) + echo (git status -s --ignore-submodules=dirty 2>/dev/null) end if [ (_git_branch_name) ] set -l git_branch (set_color -o blue)(_git_branch_name) diff --git a/share/tools/web_config/sample_prompts/classic_vcs.fish b/share/tools/web_config/sample_prompts/classic_vcs.fish index 92e75346f..68e663552 100644 --- a/share/tools/web_config/sample_prompts/classic_vcs.fish +++ b/share/tools/web_config/sample_prompts/classic_vcs.fish @@ -12,25 +12,25 @@ function fish_prompt --description 'Write out the prompt' function __fish_repaint_user --on-variable fish_color_user --description "Event handler, repaint when fish_color_user changes" if status --is-interactive - commandline -f repaint ^/dev/null + commandline -f repaint 2>/dev/null end end function __fish_repaint_host --on-variable fish_color_host --description "Event handler, repaint when fish_color_host changes" if status --is-interactive - commandline -f repaint ^/dev/null + commandline -f repaint 2>/dev/null end end function __fish_repaint_status --on-variable fish_color_status --description "Event handler; repaint when fish_color_status changes" if status --is-interactive - commandline -f repaint ^/dev/null + commandline -f repaint 2>/dev/null end end function __fish_repaint_bind_mode --on-variable fish_key_bindings --description "Event handler; repaint when fish_key_bindings changes" if status --is-interactive - commandline -f repaint ^/dev/null + commandline -f repaint 2>/dev/null end end diff --git a/share/tools/web_config/sample_prompts/robbyrussell.fish b/share/tools/web_config/sample_prompts/robbyrussell.fish index 1da972182..f539027df 100644 --- a/share/tools/web_config/sample_prompts/robbyrussell.fish +++ b/share/tools/web_config/sample_prompts/robbyrussell.fish @@ -7,36 +7,36 @@ function fish_prompt if not set -q -g __fish_robbyrussell_functions_defined set -g __fish_robbyrussell_functions_defined function _git_branch_name - set -l branch (git symbolic-ref --quiet HEAD ^/dev/null) + set -l branch (git symbolic-ref --quiet HEAD 2>/dev/null) if set -q branch[1] echo (string replace -r '^refs/heads/' '' $branch) else - echo (git rev-parse --short HEAD ^/dev/null) + echo (git rev-parse --short HEAD 2>/dev/null) end end function _is_git_dirty - echo (git status -s --ignore-submodules=dirty ^/dev/null) + echo (git status -s --ignore-submodules=dirty 2>/dev/null) end function _is_git_repo type -q git or return 1 - git status -s >/dev/null ^/dev/null + git status -s >/dev/null 2>/dev/null end function _hg_branch_name - echo (hg branch ^/dev/null) + echo (hg branch 2>/dev/null) end function _is_hg_dirty - echo (hg status -mard ^/dev/null) + echo (hg status -mard 2>/dev/null) end function _is_hg_repo type -q hg or return 1 - hg summary >/dev/null ^/dev/null + hg summary >/dev/null 2>/dev/null end function _repo_branch_name diff --git a/share/tools/web_config/sample_prompts/sorin.fish b/share/tools/web_config/sample_prompts/sorin.fish index 5246aaf02..3c0c20895 100644 --- a/share/tools/web_config/sample_prompts/sorin.fish +++ b/share/tools/web_config/sample_prompts/sorin.fish @@ -16,7 +16,7 @@ function fish_right_prompt test $status != 0 and printf (set_color red)"⏎ " - if git rev-parse ^/dev/null + if git rev-parse 2>/dev/null # Magenta if branch detached else green git branch -qv | grep "\*" | string match -rq detached and set_color brmagenta @@ -26,7 +26,7 @@ function fish_right_prompt git name-rev --name-only HEAD # Merging state - git merge -q ^/dev/null + git merge -q 2>/dev/null or printf ':'(set_color red)'merge' printf ' '