X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;ds=sidebyside;f=.shellrc;h=2b79a64297134e4e29e55d84a995a780729b3fd3;hb=96500da2b1430bff690d368bd2f0ccec23305aa8;hp=7b362b894343cebf856e0e86016dc912f6a80210;hpb=97f8a1818926af6a2ba55d64b6631194a0cba129;p=dotfiles.git diff --git a/.shellrc b/.shellrc index 7b362b8..2b79a64 100644 --- a/.shellrc +++ b/.shellrc @@ -165,8 +165,7 @@ KillAll() { } -# git-related - +if test -x /usr/bin/git >/dev/null 2>&1; then # chdir to a remote's directory (if the remote is on the local FS) cdremote() { cd "`git config --get remote.$1.url`" @@ -204,6 +203,7 @@ if test -n "$BASH_VERSION"; then complete -F _git_open git-open fi +fi include() { @@ -308,6 +308,7 @@ mkcd() { } +if which tmux >/dev/null 2>&1; then tmux() { case "$TERM" in rxvt) @@ -319,6 +320,7 @@ tmux() { ;; esac } +fi #if which pyenv >/dev/null 2>&1; then @@ -331,5 +333,8 @@ if [ -f /usr/local/bin/virtualenvwrapper_lazy.sh ]; then fi +if [ "$SHLVL" -eq 1 ] && which startx >/dev/null 2>&1; then X() { startx >> .Xserver.log 2>&1; cyr; } +fi + x() { exit; }