mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Harden Bash completion scripts against invalid states
Printing an error message is better than locking the shell up, honestly.
This commit is contained in:
@@ -151,6 +151,10 @@ _rgblink_completions() {
|
||||
done < <(compgen -A directory -- "${cur_word:$optlen}")
|
||||
compopt -o filenames
|
||||
;;
|
||||
*)
|
||||
echo >&2 "Internal completion error: invalid state \"$state\", please report this bug"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user