diff --git a/.zsh/functions.d/aliases.sh b/.zsh/functions.d/aliases.sh index 08aa9401..c237f6a7 100644 --- a/.zsh/functions.d/aliases.sh +++ b/.zsh/functions.d/aliases.sh @@ -28,7 +28,7 @@ alias lla='ls --color -la' alias llh='ls --color -lh' alias llah='ls --color -lah' -alias m='moerx -p C-x' +alias m='moerx --prefix x --status bottom' alias n='nnn -diUxe' diff --git a/.zsh/functions.d/moerx.sh b/.zsh/functions.d/moerx.sh index e34af778..623bc7c6 100644 --- a/.zsh/functions.d/moerx.sh +++ b/.zsh/functions.d/moerx.sh @@ -3,6 +3,13 @@ if [[ -n $SSH_CONNECTION ]]; then moerx_ssh_title() { local program=${1:t} 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() { local -a words