mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
Merge pull request #294 from lvicentesanchez/master
This commit is contained in:
commit
626deaf135
5
themes/fox/README.md
Normal file
5
themes/fox/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
## fox
|
||||
|
||||
cloned from oh-my-zsh.
|
||||
|
||||
![fox theme](http://i60.tinypic.com/2myaibn.jpg)
|
42
themes/fox/fish_prompt.fish
Normal file
42
themes/fox/fish_prompt.fish
Normal file
@ -0,0 +1,42 @@
|
||||
function fish_prompt
|
||||
# Cache exit status
|
||||
set -l last_status $status
|
||||
|
||||
# Just calculate these once, to save a few cycles when displaying the prompt
|
||||
if not set -q __fish_prompt_hostname
|
||||
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
|
||||
end
|
||||
if not set -q __fish_prompt_char
|
||||
switch (id -u)
|
||||
case 0
|
||||
set -g __fish_prompt_char '#'
|
||||
case '*'
|
||||
set -g __fish_prompt_char '>'
|
||||
end
|
||||
end
|
||||
|
||||
# Setup colors
|
||||
set -l normal (set_color normal)
|
||||
set -l red (set_color red)
|
||||
set -l cyan (set_color cyan)
|
||||
set -l white (set_color white)
|
||||
|
||||
# Configure __fish_git_prompt
|
||||
set -g __fish_git_prompt_char_stateseparator ' '
|
||||
set -g __fish_git_prompt_color white
|
||||
set -g __fish_git_prompt_color_flags red
|
||||
set -g __fish_git_prompt_color_prefix cyan
|
||||
set -g __fish_git_prompt_color_suffix cyan
|
||||
set -g __fish_git_prompt_showdirtystate true
|
||||
set -g __fish_git_prompt_showuntrackedfiles true
|
||||
set -g __fish_git_prompt_showstashstate true
|
||||
set -g __fish_git_prompt_show_informative_status true
|
||||
|
||||
# Line 1
|
||||
echo -n $cyan'┌['$white$USER$cyan'@'$white$__fish_prompt_hostname$cyan']'$white'-'$cyan'('$white(prompt_pwd)$cyan')'
|
||||
__fish_git_prompt "-[git://%s]-"
|
||||
echo
|
||||
|
||||
# Line 2
|
||||
echo -n $cyan'└'$__fish_prompt_char $normal
|
||||
end
|
Loading…
Reference in New Issue
Block a user