citadel

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

fuzz-create-file (214B)


      1 #!/usr/bin/env bash
      2 
      3 set -eou pipefail
      4 
      5 dir=$(rg --files | xargs dirname | sort -u | fuzzer "$@")
      6 
      7 printf 'edit ~/%s/' "$dir" >&2
      8 read name
      9 
     10 if [ -z "$name" ]; then
     11 	exit 1
     12 fi
     13 
     14 mkdir -p "$dir" && edit "$dir/$name"