Hack together a quick way to execute using local bindirs (#1)

This commit is contained in:
Andrew Tomaka 2021-03-31 23:31:05 -04:00 committed by GitHub
parent cbc8bede7a
commit 3b01025006
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 2 deletions

17
zsh-completions/_comma Normal file
View file

@ -0,0 +1,17 @@
#compdef ,
local bin_dir="aet-bin"
local found_bin_dir=""
current_dir=$(pwd)
found_bin_dir=$current_dir/$bin_dir
while [ ! -d $found_bin_dir ]; do
if [[ $current_dir == $HOME ]]; then
found_bin_dir=$HOME/bin
break
fi
current_dir=$(realpath "$current_dir/..")
found_bin_dir=$current_dir/$bin_dir
done
_files -g "^," -W $found_bin_dir