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