1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

finalize shell completions

This commit is contained in:
Kelly Brazil
2022-09-26 16:59:55 -07:00
parent efd0bae0d6
commit f30e15159f
3 changed files with 8 additions and 8 deletions

View File

@ -67,8 +67,8 @@ _jc()
fi
done
# if "/proc" (magic for Procfile parsers) is found anywhere in the line, complete with files/directories in the path
if [[ "${words[@]::${#words[@]}-1}" =~ "/proc" ]]; then
# if "/pr[oc]" (magic for Procfile parsers) is in the current word, complete with files/directories in the path
if [[ "${cur}" =~ "/pr" ]]; then
_filedir
return 0
fi

View File

@ -377,8 +377,8 @@ _jc() {
fi
done
# if "/proc" (magic for Procfile parsers) is found anywhere in the line, complete with files/directories in the path
if (( ${words:0:-1}[(Ie)/proc] )); then
# if "/pr[oc]" (magic for Procfile parsers) is in the current word, complete with files/directories in the path
if [[ "${words[-1]}" =~ "/pr" ]]; then
# run files completion
_files
return 0

View File

@ -75,8 +75,8 @@ _jc()
fi
done
# if "/proc" (magic for Procfile parsers) is found anywhere in the line, complete with files/directories in the path
if [[ "$${words[@]::$${#words[@]}-1}" =~ "/proc" ]]; then
# if "/pr[oc]" (magic for Procfile parsers) is in the current word, complete with files/directories in the path
if [[ "$${cur}" =~ "/pr" ]]; then
_filedir
return 0
fi
@ -196,8 +196,8 @@ _jc() {
fi
done
# if "/proc" (magic for Procfile parsers) is found anywhere in the line, complete with files/directories in the path
if (( $${words:0:-1}[(Ie)/proc] )); then
# if "/pr[oc]" (magic for Procfile parsers) is in the current word, complete with files/directories in the path
if [[ "$${words[-1]}" =~ "/pr" ]]; then
# run files completion
_files
return 0