diff options
author | Nathan Lasseter <nathan@4574.co.uk> | 2012-12-12 21:29:52 +0000 |
---|---|---|
committer | Nathan Lasseter <nathan@4574.co.uk> | 2012-12-12 21:29:52 +0000 |
commit | dcfd4df060a3286cd563a67ac0384c703285d700 (patch) | |
tree | 680788710606ff03305f5e107a966489b6944fbc | |
parent | 6618b5e95434cd78451add3567db303a545977af (diff) |
New Prompt!
-rw-r--r-- | config.fish | 3 | ||||
-rw-r--r-- | functions/fish_prompt.fish | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/config.fish b/config.fish index d0b765f..f5f488d 100644 --- a/config.fish +++ b/config.fish @@ -2,8 +2,5 @@ alias she='ssh njel500@milan.cs.york.ac.uk' alias sft='sftp njel500@milan.cs.york.ac.uk' alias shx='ssh -YC njel500@milan.cs.york.ac.uk' alias 4574='ssh nathan@4574.co.uk' -alias 4574r='ssh nathan@4574.co.uk -R 2222:localhost:2222' -alias page='sshfs nathan@4574.co.uk:p/ ~/mnt' -alias umnt='fusermount -u ~/mnt' set -x PATH /home/nathan/bin $PATH /opt/android-sdk-linux_x86/platform-tools/ diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 84c7e83..51dbbd7 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -5,5 +5,9 @@ function fish_prompt printf '%s%s%s' (set_color green) (cat /etc/hostname) (set_color normal) printf '] ' printf '%s%s' (set_color red) (pwd) - printf '%s>: ' (set_color normal) + if git status >/dev/null ^/dev/null + printf '%s {%s}>: ' (set_color normal) (git branch | awk -F\ '{print $2}') + else + printf '%s>: ' (set_color normal) + end end |