Fix setting terminal title after fg

The code to override the `(status current-command) was present`, but not
handled in either the default `fish_title` function or the fallback.

Closes #7444.
This commit is contained in:
Mahmoud Al-Qudsi
2020-11-28 00:53:12 -06:00
parent 9bcfa851c1
commit a3cb1e2dcd
2 changed files with 12 additions and 8 deletions

View File

@@ -1,6 +1,8 @@
function fish_title
# emacs' "term" is basically the only term that can't handle it.
if not set -q INSIDE_EMACS; or string match -vq '*,term:*' -- $INSIDE_EMACS
echo (status current-command) (__fish_pwd)
# An override for the current command is passed as the first parameter.
# This is used by `fg` to show the true process name, among others.
echo (set -q argv[1] && echo $argv[1] || status current-command) (__fish_pwd)
end
end