Skip to content

Commit

Permalink
Fix fish_prompt for special working directories
Browse files Browse the repository at this point in the history
Signed-off-by: arkbriar <[email protected]>
  • Loading branch information
arkbriar committed May 7, 2024
1 parent 2a76bd8 commit 428eb03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/fish_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ function fish_prompt
set -l pwd (prompt_pwd)
set -l base (basename "$pwd")

set -l expr "s|~|"(__batman_color_fst)"^^"(__batman_color_off)"|g; \
set -l expr "s|^~|"(__batman_color_fst)"^^"(__batman_color_off)"|g; \
s|/|"(__batman_color_snd)"/"(__batman_color_off)"|g; \
s|"$base"|"(__batman_color_fst)$base(__batman_color_off)" |g"
s|"$base\$"|"(__batman_color_fst)$base(__batman_color_off)" |g"

echo -n (echo "$pwd" | sed -e $expr)(__batman_color_off)

Expand Down

0 comments on commit 428eb03

Please sign in to comment.