From bdcdb00b7a8c16ecf6a98e28abac1defb94e21db Mon Sep 17 00:00:00 2001 From: Jessie Hildebrandt Date: Mon, 28 Oct 2019 20:12:52 -0400 Subject: [PATCH] Add custom title function --- config.fish | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/config.fish b/config.fish index 4cc84d1..88af55e 100644 --- a/config.fish +++ b/config.fish @@ -11,6 +11,22 @@ set __fish_git_prompt_show_informative_status 1 set fish_greeting "" set fish_key_bindings fish_default_key_bindings +################## +# Title Function # +################## + +function fish_title --description 'Print the title of the window' + + # Trying to set the title inside an Emacs term will break it + if set -q INSIDE_EMACS + return + end + + # Set title to the command status + working directory + echo (status current-command) (__fish_pwd) + +end + ################### # Prompt Function # ###################