9 Commits

Author SHA1 Message Date
8fcc79f49b lib/shopt: Remove nocasematch (#503)
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.
2023-12-28 11:08:42 +09:00
bea5dc9406 lib, themes: Preserve users' PROMPT_DIRTRIM
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>
2023-04-09 14:23:23 -07:00
aed5238cad lib/shopt: Revert the meaning "OMB_HYPHEN_{IN => }SENSITIVE" 2023-03-03 09:55:20 +09:00
d76bd709d0 lib/shopt: Allow CASE_SENSITIVE and HYPHEN_INSENSITIVE to work as documented
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.
2023-03-03 09:55:20 +09:00
3a26319b9e lib/shopt: tweak OMB_CASE_SENSITIVE handling in shopt (#399)
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>
2023-02-24 00:06:09 +09:00
5c541b0e69 lib/shopt: Refactor "{ => OMB_}CASE_SENSITIVE" 2023-02-16 10:30:59 +09:00
4c7bd86a5e lib/shopt: Add support for CASE_SENSITIVE
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2023-02-16 10:30:40 +09:00
c3bcc5c6d2 refactor: Normalize shebang of scripts to source 2022-01-15 19:00:35 +09:00
53fb803740 OMB - Major Refactor (#39)
* 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
2019-01-23 03:05:32 -08:00