aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/fish_prompt.fish
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-05-19 16:59:56 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-05-19 16:59:56 -0700
commitd09c9fba02b09f7de231a6c4291f18d062d8382f (patch)
tree05f7ad831f09c50160b2b02ce263560bc6956881 /share/functions/fish_prompt.fish
parentf1d22b6300b3fab2da4acc6bc196ce5e8f24b0e2 (diff)
Added a -s option to echo to mean "don't output spaces"
Replaced default prompt to stop calling printf. I opened a bug to replace the default prompt entirely with one that's cheaper.
Diffstat (limited to 'share/functions/fish_prompt.fish')
-rw-r--r--share/functions/fish_prompt.fish4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/functions/fish_prompt.fish b/share/functions/fish_prompt.fish
index 08951734..f4aab344 100644
--- a/share/functions/fish_prompt.fish
+++ b/share/functions/fish_prompt.fish
@@ -25,7 +25,7 @@ function fish_prompt --description "Write out the prompt"
end
end
- printf '%s@%s %s%s%s# ' $USER $__fish_prompt_hostname "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal"
+ echo -n -s "$USER" @ "$__fish_prompt_hostname" ' ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" '# '
case '*'
@@ -33,7 +33,7 @@ function fish_prompt --description "Write out the prompt"
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
end
- printf '%s@%s %s%s%s> ' $USER $__fish_prompt_hostname "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal"
+ echo -n -s "$USER" @ "$__fish_prompt_hostname" ' ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" '> '
end
end