X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;ds=sidebyside;f=zsh%2Frc;h=7a94a3e8d559e54d44488770f435aa7f43ad12fd;hb=f5d7699997ef7aff787306a78fedb874f7ce61c6;hp=14c3c1660ff386d092cdd0a140794db451eb66c2;hpb=6cdb1f0d39808c9a819fc7ac279469c40bfd8d82;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index 14c3c16..7a94a3e 100644 --- a/zsh/rc +++ b/zsh/rc @@ -102,13 +102,16 @@ if [[ $TERM == screen ]]; then screen_name_reset=yes screen_preexec() { + # Get the application name excluding any arguments. + local program_name=${1%% *} + # Ignore often used commands which are only running for a very short # time. This prevents a "blinking" name when it's changed to "cd" for # example and then some milliseconds later back to "zsh". - [[ ${1%% *} == (cd*|ls|la|ll|clear) ]] && return + [[ $program_name == (cd*|ls|la|ll|clear) ]] && return # Set the window name to the currently running program. - print -n "\ek${1%% *}\e\\" + print -n "\ek$program_name\e\\" # Tell precmd() to reset the window name when the program stops. screen_name_reset=yes @@ -184,11 +187,15 @@ alias du='du -sh' # Multiple files given to Vim are opened in tabs. alias vim='vim -p' -# Shortcuts for Vim. + +# Shortcuts for often used programs. +alias e='elinks' +alias g='git' +alias m='mutt' alias v='vim' alias vi='vim' -# Exit binding like in Vim. +# Exit binding like in Vim; I sometimes confuse editor and shell. alias :q='exit' # Edit the mercurial patch queue series file for the current mercurial