feat: show hostname only on remote shells

This commit is contained in:
Ashhhleyyy 2023-11-13 01:47:40 +00:00
parent 3b45d2e7c4
commit 82bc7477ac
Signed by: ash
GPG Key ID: 83B789081A0878FB
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,11 @@ in
home.packages = [ pkgs.fsh ];
programs.fish.functions.fish_prompt.body = ''
set FSH_LAST_STATUS $status
if test "$SSH_CLIENT" != "" || test "$SSH_TTY" != "" | test "$SSH_CONNECTION" != ""
set --erase FSH_NO_HOSTNAME
else
set -x FSH_NO_HOSTNAME 1
end
fsh $FSH_LAST_STATUS
'';
};