Commit Graph

449 Commits

Author SHA1 Message Date
Edwin Kofler
5cd1f0eb16 style: Remove trailing whitespace and add missing final newlines 2023-04-16 17:43:09 +09:00
Edwin Kofler
3608cd8e4e style: Add formatting rules and action 2023-04-16 17:32:53 +09:00
Dheison Gomes
11ab9e17ea
plugins/sudo: Add toggle support (#434) 2023-04-10 09:27:04 +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
02df6627ae
Merge pull request #186 from DTan13/plugins/battery 2023-04-08 15:05:40 -07:00
Koichi Murase
b15ef2ddb8
Merge pull request #418 from vicmunoz/sudo_plugin
- plugins: Add plugin "sudo"
- plugins/sudo: Add keybindings following OMZ
2023-04-08 15:00:20 -07:00
Koichi Murase
8be2e7f13e battery.plugin: Refactor 2023-04-09 00:27:34 +09:00
Dhananjay Tanpure
9875246872 plugins/battery: Get battery capacity by /sys/class/power_supply
Reference:- https://www.kernel.org/doc/html/latest/admin-guide/abi-testing.html?#abi-sys-class-power-supply-supply-name-capacity

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2023-04-09 00:25:51 +09:00
Dhananjay Tanpure
ca95a7f8a1 plugins/battery: Get adapter status by /sys/class/power_supply
Reference:- https://www.kernel.org/doc/html/latest/admin-guide/abi-testing.html?#abi-sys-class-power-supply-supply-name-online

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2023-04-09 00:25:32 +09:00
Koichi Murase
4ad3482985 plugins/sudo: Add keybindings following OMZ 2023-04-09 00:07:34 +09:00
Victor Munoz
47852f487f plugins: Add plugin "sudo" 2023-04-09 00:04:00 +09:00
Koichi Murase
0e9f0e7e7c aliases/general: Avoid using bash-4.0 feature |& 2023-04-06 11:46:04 +09:00
Koichi Murase
08d019bd10
Merge pull request #430 from mihir3445/master
The `agnoster` theme out of the box reports "command not found"
2023-04-05 01:56:45 -07:00
Koichi Murase
d7993748b0 themes/doubletime: Fix "command not found" error caused by #118 (Fix #429)
This is a regression by PR #118 on GitHub [1].

[1] https://github.com/ohmybash/oh-my-bash/pull/118.
2023-04-05 15:24:35 +09:00
Mihir Patel
aabc172d7a themes/agnoster: Fix "command not found" error caused by #118 (Fix #429)
This is a regression by PR #118 on GitHub [1].  `git_status_dirty` and
`git_stash_dirty` are functions and not external commands.

[1] https://github.com/ohmybash/oh-my-bash/pull/118
2023-04-05 15:22:33 +09:00
Koichi Murase
9b8173c984
Merge pull request #181 from rrthomas/fix-git-using-command
base.theme.sh: use “command” to run git and svn everywhere
2023-04-04 18:56:57 -07:00
Koichi Murase
1fb516dfe2 plugins/git: Prefix "command" to git aliases 2023-04-05 10:52:30 +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
Brent Wilkins
c6f7d4fe9f
aliases: Add Docker aliases (#421)
* Copied the Docker aliases from https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/docker/docker.plugin.zsh
* Sorted sections in README.md and put the new aliases in code tags
* Fixed table header divider alignment
2023-04-04 06:47:14 +09:00
Edwin Kofler
80b4974044
fix: Small syntax improvements (#424) 2023-04-02 03:02:29 +09:00
Koichi Murase
5fd472f0f2 aliases/general: Check -W flag for alias nano 2023-03-27 00:14:17 +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
Koichi Murase
96f6e00c38 completions/git: Fix search paths (fixup 70e0787, fix #415) 2023-03-13 11:20:16 +09:00
Koichi Murase
70e0787510 completions/git: Search upstream git-completion files in more paths (Fix #415)
https://github.com/ohmybash/oh-my-bash/issues/415
2023-03-13 00:10:07 +09:00
Koichi Murase
20acfcac1a completions/git: Use "_omb_util_glob_expand" 2023-03-13 00:10:02 +09:00
Koichi Murase
f6d6dccfa1 lib/utils (_omb_util_glob_expand): Avoid variable name conflicts 2023-03-13 00:10:02 +09:00
Koichi Murase
ec7efa5628
Merge pull request #383 from underwoo/case-sensitive
lib/shopt: Allow CASE_SENSITIVE and HYPHEN_INSENSITIVE to work as documented
2023-03-05 15:38:10 -08:00
Koichi Murase
aed5238cad lib/shopt: Revert the meaning "OMB_HYPHEN_{IN => }SENSITIVE" 2023-03-03 09:55:20 +09:00
Seth Underwood
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
Koichi Murase
c91a85d421 tools/install: Avoid installing .bash_profile when .profile sources .bashrc 2023-03-03 09:52:06 +09:00
Hrudaynath Dhabe
1d4ada3d5c aliases/ls: Fix a minor comment 2023-02-27 23:59:52 -08:00
Tal Lederman
a35e10c498 feat(git.plugin): adding alias to remove a local branch 2023-02-26 06:31:13 -08:00
Koichi Murase
ebd541c987 tools/install: Fix a bug that the template files is moved 2023-02-26 00:40:15 +09:00
Barak Korren
81f3983c1c
completions: Add completion files for OpenShift/K8s tools (#404)
Including: crc, oc, tkn, helm
2023-02-25 20:06:00 +09:00
Joe MacDonald
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
Koichi Murase
8531e1ba3c
Merge pull request #401 from akinomyoga/agnoster2021
themes/agnoster: Incorporate recent changes of the upstream and refactor
2023-02-22 20:40:39 -08:00
Koichi Murase
5e22c1a213
Merge pull request #400 from ohmybash/gh372
themes/rr: Add Python virtual environments
2023-02-22 20:39:20 -08:00
Koichi Murase
99763849a1 tools/uninstall: Make the uninstall script POSIX compliant 2023-02-22 22:15:20 +09:00