citadel

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

fuzz-cd-dirname (184B)


      1 #!/usr/bin/env bash
      2 set -eou pipefail
      3 
      4 ARG=${1:-""}
      5 ROOT="$PWD"
      6 if [ -n "$ARG" ]; then
      7 	cd "$ARG"
      8 	ROOT="$ARG"
      9 fi
     10 
     11 file="$($FUZZER)"
     12 file="$(dirname "$file")"
     13 
     14 echo cd \"$ROOT/$file\"