Commit Graph

147 Commits

Author SHA1 Message Date
Koichi Murase
08e297c631 fix(lib/shopt): turn on "extglob" by default
We thought that we already have `extglob` turned on, but it was just
turned on by bash-completion that we loaded from "lib/bourne-shell".
When the sytem does not have bash-completion, the extglob settings are
not enabled and thus causes an issue with constructs using extglob.
We already turn on many glob features in "lib/shopt", and there does
not seem to be reason not to turn on "extglob".  In this patch, we
enable it by default.
2024-09-09 15:18:27 +09:00
Koichi Murase
4b95670330 feat(lib/omb-util): add "_omb_util_{print,put}" 2024-09-09 00:48:07 +09:00
Koichi Murase
382ecf151f fix(lib/grep): fix quoting 2024-09-09 00:45:44 +09:00
Koichi Murase
6c73077fa4 style(lib/bourne-shell): adjust styles 2024-09-09 00:45:44 +09:00
Koichi Murase
2fd5958215 style(lib/omb-prompt-base): adjust indentation 2024-09-09 00:45:44 +09:00
Koichi Murase
1a7ef75664 fix(lib/cli): fix typos for "extglob" 2024-09-08 15:37:10 +09:00
Koichi Murase
e2abe90f99 docs(lib/omb-prompt-base): comment on the output variable 2024-09-01 09:24:27 +09:00
Koichi Murase
e3d1ba2ea0 lib/cli: Re-implement "omb" and its completion for Bash 2024-08-26 18:44:43 +09:00
Toan Nguyen
4145d7a894 lib/cli: Add "cli.bash" 2024-08-26 18:44:43 +09:00
Koichi Murase
d12ee764aa fix(lib/history): update "HIST{,FILE}SIZE" for unlimited history
mksh (MirBSD ksh) does not like empty "HISTSIZE".
2024-08-24 22:51:19 +09:00
Koichi Murase
ece0ed32cf lib/omb-prompt-base: Escape special characters in prompts 2024-07-01 15:29:54 +09:00
Koichi Murase
ad14b874fd fix(lib/utils): remove duplicate function "_omb_util_split" 2024-05-09 10:50:00 +09:00
Koichi Murase
8c5546613d docs(lib/utils): describe "_omb_util_{split,expand_glob}" in code comment 2024-05-09 10:50:00 +09:00
Koichi Murase
0177468202 lib/omb-prompt-base: Use _omb_prompt_git 2024-02-21 19:50:28 +09:00
Koichi Murase
a412761ff9 lib/omb-prompt-base: Use _omb_prompt_git_status_enabled to test hide-status 2024-02-21 19:50:17 +09:00
Koichi Murase
1e326a7d6f lib/omb-prompt-base: Check "oh-my-{bash,zsh}.hide-status" for git status 2024-02-21 19:48:06 +09:00
Koichi Murase
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
Koichi Murase
0d9a9fd73a
lib/history: remove redundant export for HISTIGNORE (#501)
There does not seem to be no specific reason that we export HISTIGNORE
[1].  These lines were introduced in commit 53fb8037 but only
HISTIGNORE had `export'.

[1] https://github.com/ohmybash/oh-my-bash/discussions/500#discussioncomment-7676355
2023-12-11 07:00:35 +09:00
Koichi Murase
9b244fe81e lib/omb-deprecate: Fix "_omb_deprecate_declare" outputting varname
Reported-By: Matt Faucher (@mattfaucher on GitHub)
1dfbd39fd6 (commitcomment-130420417)
2023-10-20 07:56:30 +09:00
Koichi Murase
1dfbd39fd6 lib/git: Refactor "POST_1_7_2_GIT => _omb_git_post_1_7_2" 2023-10-14 17:20:57 +09:00
Koichi Murase
f089d15d23 lib/git: Fix coding styles 2023-10-14 16:44:45 +09:00
Koichi Murase
948ffe786f lib/git: Change indentation 2023-10-14 16:44:45 +09:00
Koichi Murase
027d86ef94 lib/git(git_prompt_status): Avoid zsh constructs 2023-10-14 16:44:45 +09:00
Koichi Murase
96fe141c02 lib/utils: Add "_omb_util_split" 2023-10-14 16:44:45 +09:00
Koichi Murase
c93f897794 global(git): Call git for prompt through an interface function 2023-10-14 16:44:45 +09:00
Koichi Murase
6db4c4792b lib/git: Comment out an overwritten function 2023-10-14 16:44:45 +09:00
Koichi Murase
3da4bf6431 completions/{ssh,rake,capistrano}: Do not rewrite COMP_WORDBREAKS
Fix https://github.com/ohmybash/oh-my-bash/issues/471
2023-10-01 04:51:02 +09:00
Koichi Murase
24bd7e71ad lib/directories (cd): do not use pushd/DIRSTACK by default
https://github.com/ohmybash/oh-my-bash/pull/450
2023-09-25 01:10:02 +09:00
Andrei Bulgakov
117e203d38
Add variable to disable consideration repos with untracked files as dirty (#444)
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.
2023-06-09 06:17:17 +09:00
Joe MacDonald
e91797d914
omb-prompt-base: do not attempt to process git vars outside a git tree (#443)
Signed-off-by: Joe MacDonald <joe.macdonald@siemens.com>
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2023-05-24 06:35:31 +09:00
Koichi Murase
dd7807fcd2
Merge pull request #432 from fox-forks/quoting
fix: Quoting
2023-05-13 23:42:32 -07:00
Edwin Kofler
0c07172c02 fix: Fix quoting
Co-authored-by: Koichi Muarse <myoga.murase@gmail.com>
2023-04-16 18:23:22 +09:00
Koichi Murase
475a563280 feat(lib/utils): Add "_omb_util_split" 2023-04-16 18:23:15 +09:00
Edwin Kofler
5cd1f0eb16 style: Remove trailing whitespace and add missing final newlines 2023-04-16 17:43:09 +09:00
Koichi Murase
b5228038b9
Merge pull request #105 from chaifeng/directories-cd-function
lib/directories: Add `cd` function, a clone of Zsh cd builtin command
2023-04-09 14:25:11 -07:00
Koichi Murase
e99fac816a
Merge pull request #132 from ngaro/fixls
lib/theme-and-appearance: Fix broken ls-colors
2023-04-09 14:24:39 -07:00
David Dreggors
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
Nikolas Garofil
01c9ce00d2 lib/bourne-shell: Switch ls color option based on implementation
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2023-04-09 23:22:26 +09:00
Koichi Murase
681daf84e7 lib/util: Add "_omb_util_alias_delayed" 2023-04-09 23:21:56 +09:00
Koichi Murase
dd20d586da lib/directories (cd): Refactor
* 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
2023-04-09 22:16:35 +09:00
Chai Feng
618aa82460 lib/directories: Add cd function, a clone of Zsh cd builtin command
* Fix, the `~` in the first item of `DIRSTACK` may not be expanded in Cygwin
  Bash
2023-04-09 22:16:12 +09:00
Koichi Murase
1453db64c8 global: Use "command" to run "hg" 2023-04-05 10:35:13 +09:00
Koichi Murase
897876eae1 global: Use "command" to run "git" and "svn" 2023-04-05 10:35:11 +09:00
Reuben Thomas
d3e6411f54 lib/omb-prompt-base: Use "command" to run git and svn everywhere
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.
2023-04-05 10:30:39 +09:00
Marc Richter
1187cb1f16
lib/history: Fix broken link in comments (#425) 2023-04-04 20:15:10 +09:00
Marc Richter
0fd6cab041
lib/history: Removed redundant shopt command (histappend) (#426) 2023-04-04 20:14:44 +09:00
Marc Richter
78da2ce84d Removing redundant HISTIGNORE patterns 2023-04-04 04:13:43 -07:00
hiagofranco
3d14c374b9
omb-prompt-base: Add "." to git branch whitelist (#420)
* 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>
2023-04-04 20:12:42 +09:00
Edwin Kofler
80b4974044
fix: Small syntax improvements (#424) 2023-04-02 03:02:29 +09:00
Koichi Murase
eb1ea3ee19 lib/utils (_omb_util_glob_expand): Fix shopt restoration failure (fixup f6d6dcc, fix #416)
https://github.com/ohmybash/oh-my-bash/issues/416
2023-03-13 19:00:10 +09:00