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.
Add `SCM_GIT_DISABLE_UNTRACKED_DIRTY="true"` setting for
`lib/omb-prompt-base.sh`.
Add this variable as well as `SCM_GIT_IGNORE_UNTRACKED` into the
`.bashrc` template.
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>
* lib/directories (cd): Adjust style of `cd` function
* lib/directories (cd): Use regex to match integers
* lib/directories (cd): Use _omb_util_alias to replace cd
* lib/directories (cd): Update the function description
This was largely done correctly, but several invocations of “git” were not
done with “command”. This means that they could pick up aliases for git,
such as “hub” or “lab”, which would still work, but (especially with “lab”)
make things really slow.
* omb-prompt-base: Add "." to git branch whitelist
Add "." to git branch character whitelist to fix branches
like v6.0 or 5.4.2, as examples.
* Update lib/omb-prompt-base.sh
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>
- lib/bourne-shell: Add check for notify-send command prior to setting alert alias
- aliases/misc: Do not assume the absolute path of executables
- aliases/misc: Check the existence of executables for aliases
- aliases/misc: Add source information