Commit Graph

36 Commits

Author SHA1 Message Date
Koichi Murase
c3bcc5c6d2 refactor: Normalize shebang of scripts to source 2022-01-15 19:00:35 +09:00
Koichi Murase
088eee2abd lib/utils: Correctly restore shopt states in Bash < 4.1 2022-01-15 18:31:49 +09:00
Koichi Murase
35952601ad lib/omb-deprecate: Fix deprecated definitions of "e_*" 2022-01-12 18:28:19 +09:00
Koichi Murase
1543bc9d4a tools/uninstall: Do not overwrite backup bashrcs
Co-authored-by: Alexandre Alessi <alexpfba@gmail.com>
2022-01-08 15:41:07 +09:00
Koichi Murase
e84ace339b lib/utils: Rename logging functions 2022-01-08 15:31:43 +09:00
Koichi Murase
a463fb5aec Merge pull request #232 from prehensilecode/grep-alias 2022-01-08 14:17:19 +09:00
Koichi Murase
9b240245bb lib/grep: Refactor variable and function names to avoid conflicts 2022-01-02 00:25:30 +09:00
David Chin
cb3599a312 lib/grep: Avoid alias expansions on the first argument of grep (Fix #229) 2022-01-02 00:18:39 +09:00
Koichi Murase
7844f96ed6 oh-my-bash: Manage dependencies by "_omb_module_require" 2022-01-01 07:40:35 +09:00
Koichi Murase
ff9dd81628 oh-my-bash: Remove ineffective "fpath" initialization
"fpath" array is the feature of Zsh, to which there are no equivalent
in Bash.  Also, the current initialization code for "fpath" is broken;
$fpath is not expanded to the array elements but to the 0-th element
in Bash, so that only the last two paths are retained in the "fpath"
array.  Actually, oh-my-bash currently does not have any "fpath"
functions, so we can just safely remove the initialization code for
"fpath".

In case that some external scripts use the existing functions for
"fpath" initialization, we move the functions to
"lib/omb-deprecated.sh".
2022-01-01 07:40:35 +09:00
Koichi Murase
a3b8e5fdbf lib/utils: move and refactor "safe_append_prompt_command => _omb_util_append_prompt_command" 2021-12-28 09:21:17 +09:00
Koichi Murase
50d024358a lib/utils: Support termcap names for "tput" 2021-12-28 08:53:41 +09:00
Koichi Murase
d6100b81fc lib/utils: Refactor 2021-12-28 08:53:41 +09:00
Koichi Murase
56c72b87fa lib/utils: refactor "{type => _omb_util_command}_exists" 2021-12-28 08:33:07 +09:00
Alessandro Caianiello
f22cba2905 lib/utils (type_exists): Include functions when searching for a command 2021-12-28 08:28:55 +09:00
Koichi Murase
77e5874e62 themes/base: Refactor prompt strings for python envs 2021-12-27 23:53:16 +09:00
Reuben Thomas
81fc5dd49d lib/grep.sh: fix expansion of GREP_OPTIONS
Previously, only the first element of the array was expanded, which is
always the empty string, so the setting of GREP_OPTIONS was useless. Expand
the entire array.
2021-12-26 22:01:27 +09:00
Kreyren
5708cfd704 lib/utils: Code quality improvement (#103)
Fixed by suggestion 
https://github.com/ohmybash/oh-my-bash/issues/68#issuecomment-523238232

Bug: https://github.com/ohmybash/oh-my-bash/issues/68
2020-02-17 13:46:57 +11:00
Hans Wurst
27b55d1ea3 lib/theme-and-appearance: Remove using of the alias command in theme and appearance. (#107)
Setting the color is ok, but the alias should be set on another place.

Refs #106
2020-02-17 13:45:49 +11:00
Chai Feng
a0ed0675e7 Fixed typeset +m is a zsh specific feature (#49) 2019-05-09 23:28:49 +07:00
Toan Nguyen
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
Chris Tan
260144e2a0 Fix spectrum.sh
Since spectrum.sh was copied from zsh, the typeset -A used is zsh specific and in bash4, it is declare -A. I've fixed it and I've added a check to error out with a readable message, in red color, to tell the user to upgrade bash.
2018-03-05 19:41:30 -08:00
Toan Nguyen
6dd590ba8b Fix init shell after installed 2017-11-08 15:52:57 +11:00
Toan Nguyen
b85f75f798 Fix few issues & improve framework functionality
- Fixed LSCOLORS from theme-and-appearance.sh
- Fixed ii() command in core plugin
- Stop using .bashrc as Oh-My-Bash profile, use .bash_profile instead
- Automate backport new version for old version users
- Added .editorconfig for future contribution
2017-11-08 15:25:22 +11:00
Toan Nguyen
e65c390bfa Improve oh-my-bash functionality
* Implement aliases, completion in oh-my-bash
 * Added default themes from Bash-it
 * Fixed few issues
2017-10-10 18:07:01 +07:00
Toan Nguyen
85ae3414c6 Fix typo 2017-03-20 20:21:32 +07:00
Toan Nguyen
36e0f88e34 Fix issues with grep and misc 2017-03-20 20:20:17 +07:00
Toan Nguyen
a9f9eaf51f Fix issues with grep and spectrum 2017-03-20 20:18:10 +07:00
Toan Nguyen
ea1c9371e1 Added shebash line and fix some issues 2017-03-20 19:51:00 +07:00
Toan Nguyen
fc9c567fec Fix history handler and git plugin 2017-03-19 17:13:00 +07:00
Toan Nguyen
83097d10c5 Temporarily disable grep.sh 2017-03-19 16:32:17 +07:00
Toan Nguyen
a23924a10f Fix autoload .sh file in custom directory 2017-03-19 16:17:21 +07:00
Toan Nguyen
5ad4621868 Fix typeset in spectrum.sh 2017-03-19 16:12:12 +07:00
Toan Nguyen
4c689c2a48 Temporarily disable git_compare_version 2017-03-19 16:09:13 +07:00
Toan Nguyen
11674c0e55 Remove zsh shell built-in functions 2017-03-19 16:06:08 +07:00
Toan Nguyen
adc673b02a Initial Oh My Bash framework 2017-03-19 15:40:25 +07:00