Skip to content

Commit

Permalink
Merge pull request oh-my-fish#10 from bast/radovan/avoid-code-duplica…
Browse files Browse the repository at this point in the history
…tion

avoid code duplication when coloring cwd
  • Loading branch information
bpinto authored Nov 13, 2017
2 parents d6b05dd + ef3c38b commit a0fd29c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fish_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ function fish_prompt
set root_folder (command git rev-parse --show-toplevel ^/dev/null)
set parent_root_folder (dirname $root_folder)
set cwd (echo $PWD | sed -e "s|$parent_root_folder/||")

echo -n -s " " $directory_color $cwd $normal_color
else
echo -n -s " " $directory_color $cwd $normal_color
end

echo -n -s " " $directory_color $cwd $normal_color
echo -n -s " on " $repository_color (git_branch_name) $normal_color " "

if git_is_touched
Expand Down

0 comments on commit a0fd29c

Please sign in to comment.