fish_title: Make directory shortening consistent

I have no idea why this kept one component in the one case and none in
the other.

Because we already aggressively shorten the command, we can keep the directory.
This commit is contained in:
Fabian Homborg 2022-03-06 13:15:03 +01:00
parent 7b01b4d308
commit 2d545c651d

View File

@ -8,7 +8,7 @@ function fish_title
# 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.
if set -q argv[1]
echo -- $ssh (string sub -l 20 -- $argv[1]) (prompt_pwd -d 1 -D 0)
echo -- $ssh (string sub -l 20 -- $argv[1]) (prompt_pwd -d 1 -D 1)
else
# Don't print "fish" because it's redundant
set -l command (status current-command)