aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/tools/web_config/sample_prompts
diff options
context:
space:
mode:
authorGravatar Aaron Gyes <me@aaron.gy>2016-04-08 10:46:51 +0800
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2016-04-08 10:49:29 +0800
commit36691df6fe4667645b71b550ce5eea90762ac23a (patch)
treeec2d420e797298da5fd83e4ee514f9643b231835 /share/tools/web_config/sample_prompts
parent790c7f80c7d0fa1c97380885201eb50a2abcce02 (diff)
Stringify many completions and functions, with --invert stringification.
I believe apm must have been buggy - example output that I found online showed `tr` was mangling paths with spaces in it. Should be fixed. Also, use dscl on OS X in __fish_complete_users.fish like __fish_print_users.fish already does.
Diffstat (limited to 'share/tools/web_config/sample_prompts')
-rw-r--r--share/tools/web_config/sample_prompts/acidhub.fish2
-rw-r--r--share/tools/web_config/sample_prompts/nim.fish4
2 files changed, 3 insertions, 3 deletions
diff --git a/share/tools/web_config/sample_prompts/acidhub.fish b/share/tools/web_config/sample_prompts/acidhub.fish
index 45a7223e..afb70246 100644
--- a/share/tools/web_config/sample_prompts/acidhub.fish
+++ b/share/tools/web_config/sample_prompts/acidhub.fish
@@ -12,7 +12,7 @@ function fish_prompt -d "Write out the prompt"
if [ (_git_branch_name) ]
set -l git_branch (set_color -o blue)(_git_branch_name)
if [ (_is_git_dirty) ]
- for i in (git branch -qv --no-color|grep \*|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)
switch $i
case "*[ahead *"
diff --git a/share/tools/web_config/sample_prompts/nim.fish b/share/tools/web_config/sample_prompts/nim.fish
index 347af1d4..5d2dac39 100644
--- a/share/tools/web_config/sample_prompts/nim.fish
+++ b/share/tools/web_config/sample_prompts/nim.fish
@@ -3,7 +3,7 @@
function fish_prompt
and set retc green; or set retc red
- tty|grep -q tty; and set tty tty; or set tty pts
+ tty|string match -q -r tty; and set tty tty; or set tty pts
set_color $retc
if [ $tty = tty ]
@@ -48,7 +48,7 @@ function fish_prompt
echo -n ]
if type -q acpi
- if [ (acpi -a 2> /dev/null | grep off) ]
+ if [ (acpi -a 2> /dev/null | string match -r off) ]
echo -n '─['
set_color -o red
echo -n (acpi -b|cut -d' ' -f 4-)