Commit cf5b5aba authored by Bruno Pinto's avatar Bruno Pinto

Merge pull request #251 from tannhuber/master

parents 01adb417 fce4cadd
...@@ -171,7 +171,8 @@ It makes the commandline as powerful as your editor. If `$EDITOR` is not set, ...@@ -171,7 +171,8 @@ It makes the commandline as powerful as your editor. If `$EDITOR` is not set,
vi is used. vi is used.
The following shortcut needs vi mode: The following shortcut needs vi mode:
- Type `.` in NORMAL mode to edit commandline in editor. - Type `.` in NORMAL mode or `\cv` in NORMAL/INSERT mode to edit commandline in
editor.
## Sessions ## Sessions
......
This diff is collapsed.
...@@ -94,19 +94,20 @@ function __budspencer_git_status -d 'Check git status' ...@@ -94,19 +94,20 @@ function __budspencer_git_status -d 'Check git status'
end end
function __budspencer_is_git_stashed -d 'Check if there are stashed commits' function __budspencer_is_git_stashed -d 'Check if there are stashed commits'
command git stash list ^ /dev/null | wc -l command git log --format="%gd" -g $argv 'refs/stash' -- ^ /dev/null | wc -l
end end
function __budspencer_prompt_git_symbols -d 'Displays the git symbols' function __budspencer_prompt_git_symbols -d 'Displays the git symbols'
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 [ -z $is_repo ]
return
end
set -l git_ahead_behind (__budspencer_is_git_ahead_or_behind) set -l git_ahead_behind (__budspencer_is_git_ahead_or_behind)
set -l git_status (__budspencer_git_status) set -l git_status (__budspencer_git_status)
set -l git_stashed (__budspencer_is_git_stashed) set -l git_stashed (__budspencer_is_git_stashed)
if begin if [ (expr $git_status[1] + $git_status[2] + $git_status[3] + $git_status[4] + $git_status[5] + $git_status[6] + $git_stashed) -ne 0 ]
[ $is_repo=true ]
[ (expr $git_status[1] + $git_status[2] + $git_status[3] + $git_status[4] + $git_status[5] + $git_status[6]) -ne 0 ]
end
set_color $budspencer_colors[3] set_color $budspencer_colors[3]
echo -n '' echo -n ''
set_color -b $budspencer_colors[3] set_color -b $budspencer_colors[3]
...@@ -219,7 +220,7 @@ function __budspencer_prompt_pwd -d 'Displays the present working directory' ...@@ -219,7 +220,7 @@ function __budspencer_prompt_pwd -d 'Displays the present working directory'
case short case short
echo -n $user_host(prompt_pwd)' ' echo -n $user_host(prompt_pwd)' '
case long case long
echo -n $user_host$PWD' ' echo -n $user_host(pwd)' '
end end
else else
echo -n " $budspencer_prompt_error " echo -n " $budspencer_prompt_error "
......
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