Add fish config
This commit is contained in:
parent
c5a1b43a04
commit
bff3bbf87d
6 changed files with 117 additions and 0 deletions
30
config/fish/functions/fish_prompt.fish
Normal file
30
config/fish/functions/fish_prompt.fish
Normal file
|
@ -0,0 +1,30 @@
|
|||
# vim: se ts=4:
|
||||
|
||||
function fish_prompt --description 'Write out the prompt'
|
||||
set -l last_status $status
|
||||
|
||||
if not set -q __fish_prompt_normal
|
||||
set -g __fish_prompt_normal (set_color normal)
|
||||
end
|
||||
|
||||
set_color $fish_color_hostname
|
||||
echo -n (hostname -s)
|
||||
set_color $fish_color_hostname_colon
|
||||
echo -n :
|
||||
|
||||
# PWD
|
||||
set_color $fish_color_cwd
|
||||
echo -n (prompt_pwd)
|
||||
echo -n $__fish_prompt_normal
|
||||
|
||||
echo -n (__fish_git_prompt)
|
||||
|
||||
set_color $fish_color_prompt
|
||||
if [ $USER = root ]
|
||||
echo -n '# '
|
||||
else
|
||||
echo -n '$ '
|
||||
end
|
||||
|
||||
echo -n $__fish_prompt_normal
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue