mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
Mac OSX support for syl20bnr theme
This commit is contained in:
parent
ef0f1f8c40
commit
c137a4f1b1
@ -111,8 +111,8 @@ function fish_prompt -d "Write out the left prompt of the syl20bnr theme"
|
|||||||
end
|
end
|
||||||
set ps_git $colbwhite"git:"$colbcyan$git_branch_name$git_info$colnormal"@"$colbred$git_repo_name
|
set ps_git $colbwhite"git:"$colbcyan$git_branch_name$git_info$colnormal"@"$colbred$git_repo_name
|
||||||
if test "$basedir_name" != "$git_repo_name"
|
if test "$basedir_name" != "$git_repo_name"
|
||||||
set -l basedir_depth (echo (__syl20bnr_git_repo_base) | cut -d "/" --output-delimiter=" " -f 1- | wc -w)
|
set -l basedir_depth (echo (__syl20bnr_git_repo_base) | sed "s/\// /g" | wc -w)
|
||||||
set -l depth (echo (pwd) | cut -d "/" --output-delimiter=" " -f 1- | wc -w)
|
set -l depth (echo (pwd) | sed "s/\// /g" | wc -w)
|
||||||
set depth (math $depth - $basedir_depth)
|
set depth (math $depth - $basedir_depth)
|
||||||
set ps_git $ps_git$colbwhite":"$colbgreen$basedir_name$colnormal"("$depth")"
|
set ps_git $ps_git$colbwhite":"$colbgreen$basedir_name$colnormal"("$depth")"
|
||||||
end
|
end
|
||||||
@ -127,7 +127,7 @@ function fish_prompt -d "Write out the left prompt of the syl20bnr theme"
|
|||||||
# '/' without the current directory and depth.
|
# '/' without the current directory and depth.
|
||||||
set -l ps_pwd ""
|
set -l ps_pwd ""
|
||||||
if test -z "$ps_git"
|
if test -z "$ps_git"
|
||||||
set -l depth (echo (pwd) | cut -d "/" --output-delimiter=" " -f 1- | wc -w)
|
set -l depth (echo (pwd) | sed "s/\// /g" | wc -w)
|
||||||
set -l in_home (echo (pwd) | grep ~)
|
set -l in_home (echo (pwd) | grep ~)
|
||||||
if test -n "$in_home"
|
if test -n "$in_home"
|
||||||
set ps_pwd $colbwhite"home"
|
set ps_pwd $colbwhite"home"
|
||||||
@ -150,7 +150,7 @@ function fish_prompt -d "Write out the left prompt of the syl20bnr theme"
|
|||||||
if test -n "$vi_mode"
|
if test -n "$vi_mode"
|
||||||
set ps_vi $colnormal"["$vi_mode$colnormal"]"
|
set ps_vi $colnormal"["$vi_mode$colnormal"]"
|
||||||
end
|
end
|
||||||
if test "$fish_key_bindings" = "fish_vi_key_bindings"
|
if test "$fish_key_bindings" = "fish_vi_key_bindings" -o "$fish_key_bindings" = "my_fish_key_bindings"
|
||||||
set ps_vi (fish_vi_prompt_cm)
|
set ps_vi (fish_vi_prompt_cm)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user