X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.shellrc;h=78beaf7ad6991ee6e20a79304de731d21dc89dae;hb=597a890d44f44d3a9e0e646f5a5a3b64db9199fa;hp=892921c6beb5cbcc383929c5a5f0ddbf41456f7f;hpb=ad40a489bb055d06200a47b11c933f9d27f7adfe;p=dotfiles.git diff --git a/.shellrc b/.shellrc index 892921c..78beaf7 100644 --- a/.shellrc +++ b/.shellrc @@ -44,19 +44,13 @@ if test -n "$KSH_VERSION" -o -n "$FCEDIT"; then j() { jobs; } fi -if test -n "$BASH_VERSION"; then - if [ -r "$HOME"/admin/prog/bash_prompt ]; then - . "$HOME"/admin/prog/bash_prompt - set_prompt - unset set_prompt - else - PS1="${debian_chroot:+($debian_chroot)}\u@\h:\W \$SHLVL\\$ " - fi -fi - # clear screen and history, logout chlo() { clear; cd; >$HISTFILE; unset HISTFILE; history -c; logout || exit; } +if [ -n "$STY" -a "$WINDOW" != 0 ]; then + #unset MAILCHECK everywhere except for the 1st GNU screen window + unset MAILCHECK +fi include() { cfg="$1" @@ -165,8 +159,16 @@ if which tmux >/dev/null 2>&1; then fi +vim() { + command vim "$@" + rc=$? + cd "`cat \"$HOME/tmp/vim/cwd\"`" && /bin/rm "$HOME/tmp/vim/cwd" && + return $rc +} + + if [ "$SHLVL" -eq 1 ] && which startx >/dev/null 2>&1; then - X() { startx >> .Xserver.log 2>&1; cyr; rm -f .Xauthority; } + X() { startx >> .Xserver.log 2>&1; cyr; /bin/rm -f .Xauthority; } fi x() { exit; }