diff --git a/shell/.functions b/shell/.functions index 4ce388e..4f527cf 100644 --- a/shell/.functions +++ b/shell/.functions @@ -37,21 +37,21 @@ fi # jump directorys upwards until it hits a directory with multiple folders function up() { local d="" - limit=$1 + limit="$1" for ((i=1 ; i <= limit ; i++)) do - d=$d/.. + d="$d/.." done - d=$(echo $d | sed 's/^\///') + d=$(echo "$d" | sed 's/^\///') if [ -z "$d" ]; then d=.. fi - cd $d + cd "$d" } # create an directory and directly cd into it -function mcd () { - mkdir -p $1 - cd $1 +function mcd() { + mkdir -p "$1" + cd "$1" }