aboutsummaryrefslogtreecommitdiff
path: root/.config/fish
diff options
context:
space:
mode:
authorkj-sh6042024-07-13 12:58:24 -0400
committerkj-sh6042024-07-13 12:58:24 -0400
commit895162d608a519e46a2eed906c863e3696222b68 (patch)
tree93745a5eea5b2070b59a018dfcae583585e42543 /.config/fish
parent96e926c73f0f9fc3e366ace00ed60d97eede6878 (diff)
refactor: `.screenrc`-related changes
Diffstat (limited to '.config/fish')
-rw-r--r--.config/fish/functions/fish_title.fish15
1 files changed, 15 insertions, 0 deletions
diff --git a/.config/fish/functions/fish_title.fish b/.config/fish/functions/fish_title.fish
new file mode 100644
index 0000000..f3f0a93
--- /dev/null
+++ b/.config/fish/functions/fish_title.fish
@@ -0,0 +1,15 @@
+function fish_title
+ echo $argv[1] (prompt_pwd)
+
+ switch "$TERM"
+ case 'screen*'
+
+ if set -q SSH_CLIENT
+ set maybehost (hostname):
+ else
+ set maybehost ""
+ end
+
+ echo -ne "\\ek"$maybehost(status current-command)"\\e\\" > /dev/tty
+ end
+end