X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=blobdiff_plain;f=.shellrc;h=e6ae4205771cbd7de715a179cee54d4c6cb984a7;hp=eb741b1345c1124b90dc9bc7a96ece9ffe7c3357;hb=6d8fcbe56b488f473406ef26c0c7a3cc2a4f0ce1;hpb=41552ba848ec72fd207ae6fba1ab97b55574c2f6 diff --git a/.shellrc b/.shellrc index eb741b1..e6ae420 100644 --- a/.shellrc +++ b/.shellrc @@ -8,8 +8,7 @@ PS1="$OPS1 " case "$HOME" in /home/*) - home_link="`readlink /home`" - if [ -n "$home_link" ]; then + if [ -L /home ]; then START_DIR="`pwd`" && cd "$HOME" && HOME="`pwd`" && @@ -138,16 +137,8 @@ include() } -function mkcd { - if [ $# -ne 1 ]; then - echo "Usage: mkcd directory_name" >&2 - elif [ -d "$1" ]; then - cd "$1" - elif [ -e "$1" ]; then - echo "Error: $1 is a file" >&2 - else - mkdir -p "$1" && cd "$1" - fi +function git { + LESS=FRSX"$LESS" command git "$@" } @@ -218,6 +209,19 @@ mc() { } +function mkcd { + if [ $# -ne 1 ]; then + echo "Usage: mkcd directory_name" >&2 + elif [ -d "$1" ]; then + cd "$1" + elif [ -e "$1" ]; then + echo "Error: $1 is a file" >&2 + else + mkdir -p "$1" && cd "$1" + fi +} + + tmux() { case "$TERM" in rxvt)