Commit b8426119 authored by Joseph Tannhuber's avatar Joseph Tannhuber

Changed git toggle command from ',,' to '#'

parent 6b4f483d
...@@ -19,7 +19,7 @@ Translation of zsh's prezto [budspencer theme][budspencer] ...@@ -19,7 +19,7 @@ Translation of zsh's prezto [budspencer theme][budspencer]
- Last command's duration time - Last command's duration time
- Git status - Git status
* style can be toggled in NORMAL and in VISUAL mode with `,,` between * style can be toggled in NORMAL and in VISUAL mode with `#` between
- `symbols` (shows git status symbols, see below) - `symbols` (shows git status symbols, see below)
- `counts` (shows amount of files that are affected) - `counts` (shows amount of files that are affected)
* symbols: * symbols:
......
...@@ -45,7 +45,7 @@ function __budspencer_git_branch_name -d "Return the current branch name" ...@@ -45,7 +45,7 @@ function __budspencer_git_branch_name -d "Return the current branch name"
end end
end end
function fish_vi_prompt_cm --description "Displays the current mode" function fish_vi_prompt_cm -d "Displays the current mode"
switch $fish_bind_mode switch $fish_bind_mode
case default case default
set_color -b $budspencer_colors[10] $budspencer_colors[1] set_color -b $budspencer_colors[10] $budspencer_colors[1]
...@@ -65,7 +65,7 @@ function fish_vi_prompt_cm --description "Displays the current mode" ...@@ -65,7 +65,7 @@ function fish_vi_prompt_cm --description "Displays the current mode"
end end
end end
function fish_prompt_symbols --description "Display symbols" function fish_prompt_symbols -d "Display symbols"
set_color -b $budspencer_colors[2] set_color -b $budspencer_colors[2]
echo -n "" echo -n ""
# indicator for vim parent process # indicator for vim parent process
......
...@@ -30,7 +30,7 @@ function __budspencer_is_git_stashed -d "Check if there are stashed commits" ...@@ -30,7 +30,7 @@ function __budspencer_is_git_stashed -d "Check if there are stashed commits"
end end
set git_style "symbols" set git_style "symbols"
function fish_git_toggle_cm --description "Toggles style of git segment, press ,, in NORMAL mode" function fish_git_toggle_cm -d "Toggles style of git segment, press # in NORMAL or VISUAL mode"
if test $git_style = "symbols" if test $git_style = "symbols"
set git_style "counts" set git_style "counts"
else else
...@@ -38,14 +38,14 @@ function fish_git_toggle_cm --description "Toggles style of git segment, press , ...@@ -38,14 +38,14 @@ function fish_git_toggle_cm --description "Toggles style of git segment, press ,
end end
commandline -f repaint commandline -f repaint
end end
bind -M default ',,' fish_git_toggle_cm bind -M default '#' fish_git_toggle_cm
bind -M visual ',,' fish_git_toggle_cm bind -M visual '#' fish_git_toggle_cm
if set -q -x $PWDSTYLE if set -q -x $PWDSTYLE
set -x PWDSTYLE short long none set -x PWDSTYLE short long none
end end
set pwd_style $PWDSTYLE[1] set pwd_style $PWDSTYLE[1]
function fish_pwd_toggle_cm --description "Toggles style of pwd segment, press space bar in NORMAL mode" function fish_pwd_toggle_cm -d "Toggles style of pwd segment, press space bar in NORMAL or VISUAL mode"
for i in (seq 1 (count $PWDSTYLE)) for i in (seq 1 (count $PWDSTYLE))
if test $PWDSTYLE[$i] = $pwd_style if test $PWDSTYLE[$i] = $pwd_style
set pwd_style $PWDSTYLE[(math $i%(count $PWDSTYLE)+1)] set pwd_style $PWDSTYLE[(math $i%(count $PWDSTYLE)+1)]
...@@ -68,7 +68,7 @@ function fish_cmd_duration_cm -d "Displays the elapsed time of last command" ...@@ -68,7 +68,7 @@ function fish_cmd_duration_cm -d "Displays the elapsed time of last command"
end end
end end
function fish_git_prompt_cm --description "Displays the git symbols" function fish_git_prompt_cm -d "Displays the git symbols"
set -l git_prompt "" set -l git_prompt ""
set -l is_repo (command git rev-parse --is-inside-work-tree ^/dev/null) set -l is_repo (command git rev-parse --is-inside-work-tree ^/dev/null)
if test $is_repo="true" if test $is_repo="true"
...@@ -79,7 +79,7 @@ function fish_git_prompt_cm --description "Displays the git symbols" ...@@ -79,7 +79,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
if test $git_style = "symbols" if test $git_style = "symbols"
set git_prompt (set_color -o $budspencer_colors[5])" ↑" set git_prompt (set_color -o $budspencer_colors[5])" ↑"
else else
set git_prompt (set_color -o $budspencer_colors[5])" "$git_ahead_behind[1] set git_prompt (set_color $budspencer_colors[5])" "$git_ahead_behind[1]
end end
end end
...@@ -87,7 +87,7 @@ function fish_git_prompt_cm --description "Displays the git symbols" ...@@ -87,7 +87,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
if test $git_style = "symbols" if test $git_style = "symbols"
set git_prompt $git_prompt(set_color -o $budspencer_colors[5])" ↓" set git_prompt $git_prompt(set_color -o $budspencer_colors[5])" ↓"
else else
set git_prompt $git_prompt(set_color -o $budspencer_colors[5])" "$git_ahead_behind[2] set git_prompt $git_prompt(set_color $budspencer_colors[5])" "$git_ahead_behind[2]
end end
end end
end end
...@@ -97,7 +97,7 @@ function fish_git_prompt_cm --description "Displays the git symbols" ...@@ -97,7 +97,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
if test $git_style = "symbols" if test $git_style = "symbols"
set git_prompt $git_prompt(set_color -o $budspencer_colors[12])" +" set git_prompt $git_prompt(set_color -o $budspencer_colors[12])" +"
else else
set git_prompt $git_prompt(set_color -o $budspencer_colors[12])" "$git_status[1] set git_prompt $git_prompt(set_color $budspencer_colors[12])" "$git_status[1]
end end
end end
...@@ -105,7 +105,7 @@ function fish_git_prompt_cm --description "Displays the git symbols" ...@@ -105,7 +105,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
if test $git_style = "symbols" if test $git_style = "symbols"
set git_prompt $git_prompt(set_color -o $budspencer_colors[7])" –" set git_prompt $git_prompt(set_color -o $budspencer_colors[7])" –"
else else
set git_prompt $git_prompt(set_color -o $budspencer_colors[7])" "$git_status[2] set git_prompt $git_prompt(set_color $budspencer_colors[7])" "$git_status[2]
end end
end end
...@@ -113,7 +113,7 @@ function fish_git_prompt_cm --description "Displays the git symbols" ...@@ -113,7 +113,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
if test $git_style = "symbols" if test $git_style = "symbols"
set git_prompt $git_prompt(set_color -o $budspencer_colors[10])" ✱" set git_prompt $git_prompt(set_color -o $budspencer_colors[10])" ✱"
else else
set git_prompt $git_prompt(set_color -o $budspencer_colors[10])" "$git_status[3] set git_prompt $git_prompt(set_color $budspencer_colors[10])" "$git_status[3]
end end
end end
...@@ -121,7 +121,7 @@ function fish_git_prompt_cm --description "Displays the git symbols" ...@@ -121,7 +121,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
if test $git_style = "symbols" if test $git_style = "symbols"
set git_prompt $git_prompt(set_color -o $budspencer_colors[8])" →" set git_prompt $git_prompt(set_color -o $budspencer_colors[8])" →"
else else
set git_prompt $git_prompt(set_color -o $budspencer_colors[8])" "$git_status[4] set git_prompt $git_prompt(set_color $budspencer_colors[8])" "$git_status[4]
end end
end end
...@@ -129,7 +129,7 @@ function fish_git_prompt_cm --description "Displays the git symbols" ...@@ -129,7 +129,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
if test $git_style = "symbols" if test $git_style = "symbols"
set git_prompt $git_prompt(set_color -o $budspencer_colors[9])" ═" set git_prompt $git_prompt(set_color -o $budspencer_colors[9])" ═"
else else
set git_prompt $git_prompt(set_color -o $budspencer_colors[9])" "$git_status[5] set git_prompt $git_prompt(set_color $budspencer_colors[9])" "$git_status[5]
end end
end end
...@@ -137,7 +137,7 @@ function fish_git_prompt_cm --description "Displays the git symbols" ...@@ -137,7 +137,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
if test $git_style = "symbols" if test $git_style = "symbols"
set git_prompt $git_prompt(set_color -o $budspencer_colors[4])" ●" set git_prompt $git_prompt(set_color -o $budspencer_colors[4])" ●"
else else
set git_prompt $git_prompt(set_color -o $budspencer_colors[4])" "$git_status[6] set git_prompt $git_prompt(set_color $budspencer_colors[4])" "$git_status[6]
end end
end end
...@@ -146,7 +146,7 @@ function fish_git_prompt_cm --description "Displays the git symbols" ...@@ -146,7 +146,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
if test $git_style = "symbols" if test $git_style = "symbols"
set git_prompt $git_prompt(set_color -o $budspencer_colors[11])" ✭" set git_prompt $git_prompt(set_color -o $budspencer_colors[11])" ✭"
else else
set git_prompt $git_prompt(set_color -o $budspencer_colors[11])" "$git_stashed set git_prompt $git_prompt(set_color $budspencer_colors[11])" "$git_stashed
end end
end end
echo -n $git_prompt echo -n $git_prompt
...@@ -154,7 +154,7 @@ function fish_git_prompt_cm --description "Displays the git symbols" ...@@ -154,7 +154,7 @@ function fish_git_prompt_cm --description "Displays the git symbols"
end end
end end
function fish_pwd_prompt_cm --description "Displays the present working directory" function fish_pwd_prompt_cm -d "Displays the present working directory"
set -l user_host " " set -l user_host " "
if test (count $SSH_CLIENT) -gt 0 if test (count $SSH_CLIENT) -gt 0
set user_host " "$USER"@"(hostname) set user_host " "$USER"@"(hostname)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment