Commit Graph

3940 Commits (be20c07df6f8debf916da041de485267f8ecf3cb)

Author SHA1 Message Date
John D Pell be20c07df6
Merge 9a322f7786 into 1ffbc85a62 2022-03-17 07:23:48 +02:00
Noah Gorny 1ffbc85a62
Merge pull request #2138 from eviweb/fix-projects-plugin-regression
fix projects plugin regression
2022-03-16 21:54:51 +02:00
Noah Gorny 60c4c0b598
Merge pull request #2132 from NoahGorny/add-default-editor-nano
general: Add default nano editor for the edit alias
2022-03-16 21:47:02 +02:00
Eric Villard 088212fd32 fix projects plugin regression
This regression was introduced in ea2002a.

Before this commit, when the provided project was unique under all the
project paths, the command automatically change the directory to it.
Currently this is no more the case.
If there are many project paths set, then the project path menu is shown
at every call.
This PR solves this issue.

Signed-off-by: Eric Villard <dev@eviweb.fr>
2022-03-16 08:43:52 +01:00
Noah Gorny d1b831a92d
Merge pull request #2119 from BarbUk/fix/command_duration_precision
Fix/command duration precision
2022-03-14 11:59:27 +02:00
Noah Gorny 69407018a7
Merge pull request #2129 from tbhaxor/fix/awscli-completion
Clean awscli completion
2022-03-14 11:55:44 +02:00
Noah Gorny a481ff41ab general: Add default nano editor for the edit alias 2022-03-14 11:20:40 +02:00
Noah Gorny 7cc2ced3b9
Merge pull request #2122 from BarbUk/fix/grep_path
Fix grep path when a grep alias exists
2022-03-14 10:58:48 +02:00
Gurkirat Singh 66fbed7f6f
fix (completion): format awscli 2022-03-13 05:21:13 +05:30
Gurkirat Singh 6b0ca17df0
improve (lint): add awscli.completion.bash in clean_files.txt 2022-03-13 05:20:57 +05:30
BarbUk 23efb39fb0
Fix grep path when a grep alias exists 2022-03-11 09:08:58 +01:00
BarbUk e1ddf6e311
Fix dynamic clock icon (#2120)
* Fix dynamic clock icon

* Use printf variable scope

* shfmt do not like spaces
2022-03-09 22:59:48 +02:00
BarbUk 634c1f8c18
Fix spacing in string output 2022-03-09 11:01:53 +01:00
BarbUk 4686ce1f12
Fix precision to use deciseconds instead of nanoseconds 2022-03-09 09:38:16 +01:00
Noah Gorny a6fd93076d
Merge pull request #2114 from NoahGorny/fix-preview
Fix bash-it preview
2022-03-08 16:59:02 +02:00
Noah Gorny 13531c9534 lib: search: Increase delay in _bash-it-flash-term to 0.2 secs 2022-03-08 00:02:23 +02:00
Noah Gorny 77c135956d lib: preview: Load only bash-it.sh when previewing
Otherwise you change your theme to your default...
2022-03-08 00:01:37 +02:00
Noah Gorny 23ac376f10
Merge pull request #2110 from tbhaxor/feature/osx-alias
Add open brave browser alias
2022-03-07 00:25:36 +02:00
Ira Abramov ec6d371db8
Add a 'theme' for OMP, so the internal themes don't clash with it. (#2100)
* Add a 'theme' for OMP, so the internal themes don't clash with it.

* Add theme to clean_files

* Add screenshot to the docs

* Correct the name of the default theme in the docs.

* keeping it cleaner

Co-authored-by: Ira Abramov <github@ira.abramov.org>
2022-03-07 00:23:49 +02:00
John D Pell db6fd42104
Merge pull request #2108 from tbhaxor/patch-3
fix test file path in `clean_files.txt` from the 7fcad6e commit
2022-03-06 12:17:25 -08:00
Gurkirat Singh f2b4d82527 feature (alias): add open brave browser 2022-03-06 12:00:23 +05:30
Gurkirat Singh 55e698a737
fix test file path from the 7fcad6ed0d commit 2022-03-06 04:25:33 +05:30
John D Pell 9a322f7786 plugin/ble.sh 2022-03-04 13:08:11 -08:00
John D Pell 7a9420ec9b lib/battery: rename `plugin/battery`
This plugin *only* provides utility functions, so it has zero cost to just being enabled. This allows us to eliminate assumptions from `lib/theme` and several themes.
2022-03-04 13:08:11 -08:00
John D Pell 4cb7453e90 plugins/xterm: not just Xterm 2022-03-04 13:08:11 -08:00
John D Pell 66dae7ca82 completion/grunt: shellcheck 2022-03-04 13:08:11 -08:00
John D Pell 74ff3a9cc8 aliases/general: minor fixes
- Don't define some aliases if the target isn't installed, use _command_exists to check instead of `type` and `which`.
- Use `$EDITOR` for the editor for aliases about editing, excep the `sudo` ones because maybe you want those specifically?
- Fix `ls` aliases to match their common definitions (-A instead of -a: don't show '.' and '..' when displaying hidden files).
2022-03-04 13:08:11 -08:00
John D Pell 636cf50ede plugins/go: simplify _bash-it-gopath-pathmunge() 2022-03-04 13:08:11 -08:00
John D Pell c515f78acb pathmunge tests 2022-03-04 13:08:11 -08:00
John D Pell 7958fc450a template: remove `$SHORT_HOSTNAME`
- it doesn't make sense; I'm guessing it was due to a misunderstanding of host names?
2022-03-04 13:06:41 -08:00
John D Pell a652b5d306 make aliases load very late
...and update all the tests...
2022-03-04 13:06:41 -08:00
John D Pell ac17b713a8 lib: delete `appearance.bash`
This adds *two* lines to `bash_it.sh`. Just not worth an extra file requiring special handling.
2022-03-04 13:06:41 -08:00
John D Pell c09c050325 Revert "bash_it: source reloader.bash without arguments for the default enabling"
This reverts commit e05fa477d7.
This reverts commit ee853670a1.
2022-03-04 13:06:04 -08:00
John D Pell 8a6debd9d2 lint: add lib to clean_files.txt 2022-03-04 13:05:56 -08:00
John D Pell affbce6de1 template: `shellcheck`
- and generally comment out useless varbls
2022-03-04 13:04:48 -08:00
John D Pell 52cd75b27e template: `shfmt` 2022-03-04 13:04:48 -08:00
John D Pell 68149f7c8d uninstall: try to determine initialization file
uninstall: TIL that `fgrep` is deprecated...
2022-03-04 13:04:48 -08:00
John D Pell 0485778117 uninstall: //echo/printf
- Alsö, add implementation note at top.
2022-03-04 13:04:48 -08:00
John D Pell 4c5e87e545 install: `_bash-it-install-modify-profile()` 2022-03-04 13:04:48 -08:00
John D Pell d55adc610f docs: fix references to `~/.bashrc`
docs/installation: add to note about interactive/login shells
2022-03-04 13:04:48 -08:00
John D Pell c3de63b787 uninstall: cleanup 2022-03-04 13:04:48 -08:00
John D Pell 0853724c7d install: cleanup 2022-03-04 13:04:48 -08:00
John D Pell e888ddf953 install: use `.bashrc` and notify user
The logic to guess whether to use `.bash_profile` or `.bashrc` was buggy and wrong. Just use `.bashrc` and either automatically fill in a `.bash_profile`, or notify the user that they need to edit their `.bash_profile`.
2022-03-04 13:04:48 -08:00
John D Pell 3a778072db
Merge pull request #1906 from gaelicWizard/command_duration
Revamp command duration helper/plugin
2022-03-04 13:00:05 -08:00
John D Pell 866e5be86b lib/command_duration: tests & whitespace 2022-03-04 12:58:07 -08:00
John D Pell 1c2fc2837f lib/command_duration: adopt `_bash_it_library_finalize_hook` 2022-03-04 12:58:07 -08:00
John D Pell 4e0e59230b lib/command_duration: rename `theme/command_duration.theme`
Rename the `theme/command_duration.theme` file as it's not really got anything to do with theming or SCM.
2022-03-04 12:58:07 -08:00
John D Pell 6ca10cf84c plugin/cmd-returned-notify: Rewrite to match/use `lib/command_duration`
Use `$EPOCHREALTIME` (or `$SECONDS`) built-in variable provided by Bash instead of `date +%s`. We're only measuing the difference in seconds, so avoid both the binary invocation as well as the subshell.

Alsö, Reduce environmental pollution by not exporting every variable, and unsetting when done.

Change variable names to match lib/command-duration

Remove `preexec_return_notification()` in favor of `lib/command-duration`'s `_command_duration_pre_exec()`.

This should now use the same preexec hook and variables as the theme library `command_duration`.

tests: handle nanoseconds
2022-03-04 12:58:07 -08:00
John D Pell 33505d4db1 lib/command_duration: Refactor using `$EPOCHREALTIME`
Fallback to `$SECONDS` for older versions of _Bash_.

Instead of shortcircuiting the definition, just short-circuit the function. This allows the variable to be set later, e.g. on theme change.
2022-03-04 12:58:07 -08:00
John D Pell 09e8c25b64 lib/command_duration: dynamic clock hand
Calculate the position (from 1 to 12) of the hour hand on the clock emoji used for the _command_duration string.

Expressly handle COMMAND_DURATION_COLOR as blank when undefined.
2022-03-04 12:39:58 -08:00