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:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user