Commit Graph

670 Commits

Author SHA1 Message Date
Marco A. Gallegos
f53beb64b8
themes: Add a new theme developer focusing on devs (#526)
* feat(themes): added new theme
* fix(themes): screenshot updated
* fix(themes): image sizing
* chore(themes): updated theme description
* style(themes/developer): fix the indentation
* refactor(themes/developer): prefix "_omb_theme_developer_" to internal functions
* refactor(themes/developer): delimit returned values with newlines

"grep -P" is not POSIX.  Instead of using PCRE to extract the results
separated by "---", we can simply separate the results with newlines
and use standard utilities (which assumes line-oriented data) to
manipulate the data.

* refactor(themes/developer): use "_omb_util_command_exists"
* refactor(themes/developer): use awk to pick the activated conda env
* fix(themes/developer): remove meaningless forks
* fix(themes/developer): use "_omb_util_put" instead of "printf"
* style(themes/developer): fix coding styles
* chore(themes/developer): clean up codes for debugging
* fix(themes/developer): fix wronge uses of arithmetic commands
* fix(themes/developer): localize variables used in functions
* refactor(themes/developer): use "return_delimited" at the end of functions
* fix(themes/developer): fix a problem that it sometimes fails to extract CPU usage
* fix(themes/developer): avoid mixing stdout

This attempted to run the commands to extract information in parallel,
but this may result in interleaved information in some operating
system (depending on the way how the C library performs buffering and
how the syscall write(2) issued by multiple processes would interfere
with one another).

There are other parts we can optimize, so we would compensate the
overhead with the optimization of other parts.

* perf(themes/developer): load prompt information through REPLY
* perf(themes/developer): reduce the number of forks
* fix(themes/developer): suppress error message of non-existent commands
* fix(themes/developer): disable prompt element with unavailable information

---------

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2024-09-11 17:14:18 +09:00
Koichi Murase
8cc21b7fc0
Merge pull request #600 from elg/master
feat(themes/powerline-icon): support `OMB_THEME_POWERLINE_ICON_CLOCK` for the date string in segment `user_info`
2024-09-10 21:52:16 +09:00
Koichi Murase
275b606aa9 style(themes/powerline-*): adjust styles 2024-09-10 11:22:46 +09:00
Koichi Murase
2428b27143 style(themes/powerline-icon): fix indentation 2024-09-10 11:04:02 +09:00
Koichi Murase
45673a8be5 docs(themes/powerline-*): remove duplicate desc of powerline themes 2024-09-10 11:02:12 +09:00
Koichi Murase
154157c3e9 docs(themes/powerline-icon): add README.md 2024-09-10 10:51:57 +09:00
Koichi Murase
9f05765935 fix(themes/powerline-wizard): fix the permission of README.md 2024-09-10 10:32:17 +09:00
Koichi Murase
f8895234f3 fix(themes/powerline-icon): use OMB_THEME_POWERLINE_ICON_CLOCK for time format 2024-09-10 10:31:10 +09:00
Erwan Le Gall
1d0ea0fa1e feat(themes/powerline-icon): support THEME_CLOCK_FORMAT in .bashrc 2024-09-10 10:29:13 +09:00
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
770d6ef181 Merge branch '_omb_util_print' 2024-09-09 00:50:08 +09:00
Koichi Murase
4309ed793a refactor(plugins/bashmarks): avoid using nested eval and echo 2024-09-09 00:48:11 +09:00
Koichi Murase
31f2700e07 fix(themes/doubletime): avoid using "eval echo \$\'echo ...\'" 2024-09-09 00:48:11 +09:00
Koichi Murase
838e639a15 style(themes/doubletime): adjust styles 2024-09-09 00:48:11 +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
a5e39282db fix(themes/{cupcake,lambda}): avoid arbitrary text in the printf format 2024-09-09 00:45:44 +09:00
Koichi Murase
fc969116e2 style(plugins/{progress,vagrant}): adjust indentation 2024-09-09 00:45:43 +09:00
Koichi Murase
e78373c9f7 style(themes/brunton): adjust indentation 2024-09-09 00:45:43 +09:00
Koichi Murase
1a7ef75664 fix(lib/cli): fix typos for "extglob" 2024-09-08 15:37:10 +09:00
Кирилл Леонов
b246494afc
aliases/cargo: Move cargo plugin to aliases (#599) 2024-09-03 20:40:28 +09:00
clebron949
031e4b7a84
feat(plugins): add new plugin "dotnet" for .NET CLI (#597) 2024-09-01 22:11:59 +09:00
Koichi Murase
c770cbe1c5
Merge pull request #587 from HarrisonGagnon/bugfix/theme-ht-env
themes/ht: Fixed env printing
2024-09-01 09:25:44 +09:00
Koichi Murase
e2abe90f99 docs(lib/omb-prompt-base): comment on the output variable 2024-09-01 09:24:27 +09:00
Harrison Gagnon
6031d66ea7 fix(themes/ht): fix usage of "_omb_prompt_get_{rbenv,virtualenv}" 2024-09-01 09:24:02 +09:00
Koichi Murase
4083441dc0
Merge pull request #596 from tpCodeX/master
Add new theme: powerline-wizard
2024-09-01 09:22:17 +09:00
Koichi Murase
a0d6af5541 refactor(themes/powerline-icon): allow specifying icons through variables 2024-09-01 09:20:33 +09:00
tpcodex
c2f572f14c themes: Add new theme: powerline-wizard 2024-09-01 09:20:10 +09:00
Кирилл Леонов
1c53b8bf5d
plugins/rbenv: Added a new plugin for working with rbenv (#590) 2024-09-01 09:14:59 +09:00
Rob Loach
a3720d83b2
plugins/asdf: Add asdf extendable version manager plugin (#593)
* plugins: Add asdf plugin
* plugins/asdf: Add docs

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2024-09-01 09:13:34 +09:00
Koichi Murase
a3ea82a5be fix(completions/tmux): fix syntax
Regression introduced by commit 52987b3d.  This is a typo.  The reason
that it slipped off checking was because the syntax "if (()) then"
became valid in Bash 5.2, and it was tested using Bash 5.3-alpha.
2024-08-27 22:57:06 +09:00
Koichi Murase
c57a5fbeca Merge branch 'cli-bash' 2024-08-26 18:47:00 +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
Toan Nguyen
5a3e891525 LICENSE: Update 2024-08-26 18:44:42 +09:00
Koichi Murase
35f2daf838 style(completions/svn): remove trailing spaces 2024-08-25 13:25:56 +09:00
Koichi Murase
dfa9e25e28 Merge branch 'refactor-completions' 2024-08-25 13:11:15 +09:00
Koichi Murase
eb98412ea1 fix(completions/defaults): use "_known_hosts" if available 2024-08-25 13:09:27 +09:00
Koichi Murase
74012c548c fix(completions/defaults): fix the pattern for command name 2024-08-25 13:09:27 +09:00
Koichi Murase
05a62399a7 feat(completions/virtualbox): apply the upstream change 2024-08-25 13:09:27 +09:00
Koichi Murase
7092a7bc60 feat(completions/svn): update from the upstream svn 2024-08-25 13:09:27 +09:00
Koichi Murase
9a9687a911 feat(completions/git_flow_avh): apply changes from upstream 2024-08-25 13:09:27 +09:00
Koichi Murase
47eeec81ab feat(completions/hub): apply upstream changes 2024-08-25 13:09:27 +09:00
Koichi Murase
52987b3d35 style(completions/...): fix styles
* style(completions/defaults): fix styles
* style(completions/go): adjust styles
* style(completions/gradle): adjust styles
* style(completions/grunt): adjust styles
* style(completions/maven): adjust styles
* style(completions/salt): adjust styles
* style(completions/sdkman): adjust styles
* style(completions/tmux): adjust styles
* style(completions/vagrant): adjust styles
* style(completions/vault): adjust styles
2024-08-25 13:09:27 +09:00
Koichi Murase
020005bcc8 feat(completions/vagrant): apply changes in the upstream version 2024-08-25 13:09:27 +09:00
Koichi Murase
0f68af869b feat(completions/maven): apply changes from the upstream 2024-08-25 13:09:27 +09:00
Koichi Murase
bf83c641b0 feat(completions/salt): apply changes from upstream 2024-08-25 13:09:27 +09:00
Koichi Murase
7ddbf0b541 style(completions/...): fix indentation
* style(completions/defaults): fix indentation
* style(completions/{gh,hub}): fix indentation
* style(completions/git_flow_avh): adjust indentation
* style(completions/go): adjust indentation
* style(completions/gradle): adjust indentation
* style(completions/maven): adjust indentation
* style(completions/salt): adjust indentation
* style(completions/sdkman): adjust indentation
* style(completions/tmux): adjust indentation
* style(completions/vagrant): adjust indentation
* style(completions/virtualbox): adjust indentation
2024-08-25 13:09:27 +09:00