Update whatsdirty
This commit is contained in:
@@ -261,8 +261,13 @@ main() {
|
|||||||
# === Autocomplete Function ===
|
# === Autocomplete Function ===
|
||||||
|
|
||||||
handle_autocomplete() {
|
handle_autocomplete() {
|
||||||
|
# Ensure COMP_WORDS and COMP_CWORD are set
|
||||||
|
if [ -z "${COMP_WORDS+x}" ] || [ -z "${COMP_CWORD+x}" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
local cur_word="${COMP_WORDS[COMP_CWORD]}"
|
local cur_word="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
|
||||||
# If we're completing the first argument after 'whatsdirty'
|
# If we're completing the first argument after 'whatsdirty'
|
||||||
if [ ${COMP_CWORD} -eq 1 ]; then
|
if [ ${COMP_CWORD} -eq 1 ]; then
|
||||||
# Suggest common directories and saved directory
|
# Suggest common directories and saved directory
|
||||||
|
Reference in New Issue
Block a user