From a116737b33bcc774c97d38101b130425df6aa90d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 5 Oct 2015 12:11:11 +0300 Subject: [PATCH] .shellrc: minor refactoring --- .shellrc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) 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) -- 2.39.5