The setting `shopt -s nocasematch` affects every pattern matching in
Bash including the case statement, [[ str == pat ]] matching,
${var/pat/rep}, and ${var#pat}. Since the affected range is too
large, this potentially breaks the existing functions. This setting
`shopt -s nocasematch` seems the one that should be enabled locally
when it is specifically needed rather than being enabled globally.
These changes in "themes/{agnoster,roderik,vscode}.sh" and "lib/shopt.sh" will
allow a user to set the PROMPT_DIRTRIM variable in their .bashrc and change the
prompt path length.
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
Adjusted shopt.sh to use CASE_SENSITIVE and HYPHEN_INSENSITIVE
variables to affect completion.
Note: this changes the old default hyphen insensitive completion
behavior. The user will need to set HYPHEN_INSENSITIVE="true" to have
the old default behavior.
The CASE_SENSITIVE setting is checked when setting case-insensitive
globbing but not matching (for features such as command / programmable
completion). Add checks in the appropriate places, preserving the default
(insensitive) behaviour unless explicitly changed.
This will allow case-sensitivity to apply in an intuitive way, treating
paths, filename completions and command completions consistently.
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
* OMB - Major Refactor
- Aliases and completions now works like plugins (need to enabled in .bashrc)
- Removed the compatible check in spectrum.sh, OMB now works with Bash v3.x like the old days.
- Removed core plugin, added those bash functions into base.sh and load during startup.
- Updated OSH template for new installations
- Added history config and few other stuff from #17
@TODO: Added a shell script to update old version of .bashrc to new one.
* Fixed ShellCheck issues
* Fixed ShellCheck issues