From 2eb610513889b2c9653c4481647007f189f98096 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 26 May 2013 15:33:55 +1200 Subject: Handle null arguments to cd --- bash/bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bash/bashrc b/bash/bashrc index b65f86ff..c062e20c 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -152,8 +152,10 @@ alias diff='diff -u' function cd { if [[ -n "$2" ]]; then builtin cd "${PWD/$1/$2}" + elif [[ -n "$1" ]]; then + builtin cd "$1" else - builtin cd "$*" + builtin cd fi } -- cgit v1.2.3