1
0
Prechádzať zdrojové kódy

Add scripts to set purpose in shell title

Use `purpose <title-prefix>` to set the purpose of your current shell
(only set the FISH_SHELL_PURPOSE env variable).

Add a custom fish_title function.
DricomDragon 5 rokov pred
rodič
commit
43bb07e2b8

+ 3 - 0
Install/Templates/fish/functions/fish_title.fish

@@ -1,3 +1,6 @@
 function fish_title
+	if set -q FISH_SHELL_PURPOSE
+		echo -n "[$FISH_SHELL_PURPOSE] "
+	end
     echo $argv[1]
 end

+ 3 - 0
Install/Templates/fish/functions/purpose.fish

@@ -0,0 +1,3 @@
+function purpose
+	set --global FISH_SHELL_PURPOSE $argv
+end