X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=f9b13b0d615e82fb7d7f03fdcd9fe9c24af3c7f6;hb=e005fe62512b9ec910ab3cc26c773ba5dc79b7e6;hp=da5edc4a98197024afc0b77a4d3df831e75166f1;hpb=de8ff5bfd82dc08d229790edc326d05bb9888d6e;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index da5edc4..f9b13b0 100644 --- a/zsh/rc +++ b/zsh/rc @@ -319,7 +319,7 @@ if [[ $TERM == screen* || $TERM == xterm* || $TERM == rxvt* ]]; then # precmd() call. window_reset=yes # Is set to a non empty value when the shell is running as root. - if [[ $(id -u) -eq 0 ]]; then + if [[ $UID -eq 0 ]]; then window_root=yes fi @@ -372,10 +372,10 @@ if [[ $TERM == screen* || $TERM == xterm* || $TERM == rxvt* ]]; then # If screen is running in SSH then display "@:hostname" as title # in the term/outer screen. if [[ $program_name == @screen ]]; then - program_name="@:${$(hostname)//.*/}" + program_name="@:${HOST//.*/}" # Use "@:!hostname" for root screens. elif [[ $program_name == @!screen ]]; then - program_name="@:!${$(hostname)//.*/}" + program_name="@:!${HOST//.*/}" fi fi @@ -580,12 +580,21 @@ tig() { $@ } +# Pipe output through less. +tree() { + command tree -C "$@" | less +} + +# Automatically disown. +xpdf() { + command xpdf "$@" & + disown %command +} -# OS SPECIFIC SETTINGS -local uname=$(uname) +# OS SPECIFIC SETTINGS -if [[ $uname == Linux ]]; then +if [[ $OSTYPE == linux* ]]; then # Settings when creating Debian packages. DEBEMAIL=simon@ruderich.org export DEBEMAIL