citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

commit 6e658b51ee64375d1229561b6fd257f151877364
parent bf63c89fbddbbb5f0a6bfda4f0060231bb168ff3
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 13 Nov 2020 07:47:08 -0800

fuzz/cd: allow initial dir arg

Diffstat:
Mbin/fuzz-cd-dirname | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bin/fuzz-cd-dirname b/bin/fuzz-cd-dirname @@ -1,2 +1,8 @@ #!/usr/bin/env bash -file="$(fuzz dirname)" && echo "cd \"$file\"" +set -e +ROOT="$PWD" +if [ -n "$1" ]; then + cd "$1" + ROOT="$1" +fi +file="$(fuzz dirname)" && echo "cd \"$ROOT/$file\""