]> git.phdru.name Git - dotfiles.git/commitdiff
.shellrc: minor refactoring
authorOleg Broytman <phd@phdru.name>
Mon, 5 Oct 2015 09:11:11 +0000 (12:11 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 5 Oct 2015 09:11:11 +0000 (12:11 +0300)
.shellrc

index e47cda2abd976cfa13f98fccf3705c1146a585c8..50dfa870935e741d1bb3f71239a19975e05c82db 100644 (file)
--- 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)