From 0041075e5f00c9204f7a09d307310a8d87643040 Mon Sep 17 00:00:00 2001 From: mathew-fleisch Date: Thu, 15 Oct 2020 23:53:40 +0000 Subject: [PATCH] Fix bug when executing cd with no arguments. Should change directories to the user's /root directory --- fig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fig.sh b/fig.sh index b92400d..9a2aa73 100644 --- a/fig.sh +++ b/fig.sh @@ -5,7 +5,7 @@ then fig bg:cd # Backup for getting Fig's context - function cd() { builtin cd "$1"; fig bg:cd || true; } + function cd() { if [ -n "$1" ]; then builtin cd "$1"; else builtin cd; fi; fig bg:cd || true; } ##Run aliases shell script [ -s ~/.fig/user/aliases/_myaliases.sh ] && source ~/.fig/user/aliases/*.sh