Some .zsh updates.

This commit is contained in:
Johannes Findeisen 2026-11-16 00:13:23 +01:00
commit ee2bfa3922
2 changed files with 8 additions and 1 deletions

View file

@ -28,7 +28,7 @@ alias lla='ls --color -la'
alias llh='ls --color -lh' alias llh='ls --color -lh'
alias llah='ls --color -lah' alias llah='ls --color -lah'
alias m='moerx -p C-x' alias m='moerx --prefix x --status bottom'
alias n='nnn -diUxe' alias n='nnn -diUxe'

View file

@ -3,6 +3,13 @@ if [[ -n $SSH_CONNECTION ]]; then
moerx_ssh_title() { moerx_ssh_title() {
local program=${1:t} local program=${1:t}
printf '\033]2;%s:%s\007' "${HOST%%.*}" "$program" printf '\033]2;%s:%s\007' "${HOST%%.*}" "$program"
local directory=$PWD
if [[ $directory == "$HOME" ]]; then
directory='~'
elif [[ $directory == "$HOME/"* ]]; then
directory="~/${directory#"$HOME/"}"
fi
printf '\033]777;moerx-cwd;%s\007' "$directory"
} }
moerx_ssh_preexec() { moerx_ssh_preexec() {
local -a words local -a words