From fb42af7a2a6cf1eb5517fc7be016396131347858 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 10 Sep 2016 15:47:50 -0400 Subject: [PATCH] Add up alias to go up N directories --- .zshrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.zshrc b/.zshrc index 7c26bd6..99d63f4 100644 --- a/.zshrc +++ b/.zshrc @@ -42,5 +42,17 @@ npm() { npm "$@" } +# Go up N directories +up() { + str="" + count=0 + while [ "$count" -lt "$1" ]; + do + str=$str"../" + let count=count+1 + done + cd $str +} + # default file openings alias -s ipr=open