From 05c0765c4ec4c8fee7e2d485587e033b9e4e4543 Mon Sep 17 00:00:00 2001 From: Sergey Slipchenko Date: Mon, 18 Dec 2023 20:09:53 +0400 Subject: [PATCH] Use `status current-command` for title Why: 1. `$_` is marked as deprecated https://fishshell.com/docs/current/language.html#envvar-_ 2. `$_` contains wrong process name in cases like this one: ```fish sleep 1000 # `sleep` is the process, now press Ctrl-Z to suspend fg # unsuspend it, now `fg` is shown as the process ``` `status current-command` will show `sleep` instead, which makes more sense. --- functions/fish_title.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fish_title.fish b/functions/fish_title.fish index 3a97daf..c9f40ce 100644 --- a/functions/fish_title.fish +++ b/functions/fish_title.fish @@ -18,7 +18,7 @@ function fish_title __bobthefish_title_user if [ "$theme_title_display_process" = 'yes' ] - echo $_ + status current-command [ "$theme_title_display_path" != 'no' ] and echo ' '