From: Oleg Broytman Date: Mon, 5 Oct 2015 09:11:11 +0000 (+0300) Subject: .shellrc: minor refactoring X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=a116737b33bcc774c97d38101b130425df6aa90d .shellrc: minor refactoring --- diff --git a/.shellrc b/.shellrc index e47cda2..50dfa87 100644 --- a/.shellrc +++ b/.shellrc @@ -137,16 +137,6 @@ 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 } @@ -217,6 +207,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)