From 10825131eee1096ad0a04025577e0c1c7a957dad Mon Sep 17 00:00:00 2001 From: eleith Date: Fri, 4 Aug 2023 21:26:14 +0000 Subject: [PATCH] MANUAL PIPELINE @ main --- config/fish/functions/fish_title.fish | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/fish/functions/fish_title.fish b/config/fish/functions/fish_title.fish index 55873bd..0225d42 100644 --- a/config/fish/functions/fish_title.fish +++ b/config/fish/functions/fish_title.fish @@ -1,6 +1,5 @@ function fish_title --argument-names last_cmd set prefix "" - set last_path (string split ' ' $last_cmd)[2..] if set -q SSH_CLIENT if not set -q TMUX @@ -13,7 +12,14 @@ function fish_title --argument-names last_cmd if [ fish != $_ ] switch $_ case vi vim nvim + set last_path (string split ' ' $last_cmd)[2..] + + if test -n "$last_path" + and test -f "$last_path" echo "$prefix$_ $(path basename $last_path)" + else + echo "$prefix$last_cmd" + end case '*' echo "$prefix$last_cmd" end