Gurkirat Singh
e38696a0ac
fix (completion): suppress 1091 in brew ( #2130 )
2023-02-23 10:38:04 -08:00
OMEGA_RAZER
af11a50854
Allow for longer command min duration ( #2198 )
...
Allows for setting "COMMAND_DURATION_MIN_SECONDS" to more than 60 seconds without adding to prompt. Previously always showed with lengths over 60 seconds regardless of setting.
2023-02-22 08:24:30 -08:00
Gurkirat Singh
05ef68acbc
Implement yarn completion ( #2190 )
...
* feat (completion): add yarn completion
2023-02-22 08:20:45 -08:00
Gurkirat Singh
78f88406cf
Fix lint errors in multiple files ( #2192 )
...
* fix (plugins): enable interpretation of backslash escapes in colors
* fix (lint): disable SC2317 in install.sh
* fix (lint): SC2086 in agnoster theme
* fix (lint): remove exit from install.sh as it is already implemented in the calling function
2023-02-22 08:19:12 -08:00
BF
feb468b517
bug: Use C style strings when checking for invalid alias characters ( #2188 )
...
* Use C style strings when checking for invalid alias characters
Before, the '\n' would be interpreted as 'n' meaning that any alias
who's command contained the letter 'n' would incorrect be skipped.
* No need to escape characters in this context
Escaping was just adding \ to the list multiple times
Co-authored-by: David Farrell <davidpfarrell+github@gmail.com>
2023-01-25 15:56:14 -08:00
Noah Gorny
66ae9b0de8
Remove libra chat reference
...
We will try to use Github Discussions now.
2022-12-06 00:22:27 +02:00
Noah Gorny
2e52d2a77c
Merge pull request #2109 from tbhaxor/feature/terraform-alias
...
Add terraform init alias
2022-12-06 00:15:40 +02:00
Noah Gorny
4c2e644db1
Merge pull request #2159 from bittner/patch-3
...
Add more aliases for `git branch`, use long form
2022-12-05 23:15:13 +02:00
Peter Bittner
f0941e9ba2
Add more aliases for `git branch`, use long form
...
Git can list local branches, remote branches, and both of them together.
Let's use the long form of the options to make the aliases quicker to understand.
As agreed in PR #2159 , we introduce gbl and replace gba/gbr by gbla/gblr.
gbl/gbla/gblr allow wildcard arguments for filtering branch names.
2022-12-05 11:01:57 +01:00
Noah Gorny
ad2b55804e
Merge pull request #2172 from davidpfarrell/bug/duration_locale
...
bug: Use en_US when fetching EPOCHREALTIME
2022-12-04 00:42:05 +02:00
Noah Gorny
ec3c06fa33
Merge pull request #2166 from cornfeedhobo/rename-kubectl-alias-func
...
remove function wrapper around kubectl aliases
2022-12-04 00:39:49 +02:00
Noah Gorny
686a5e45cb
Merge pull request #2146 from dylanjtuttle/update_bash_branch
...
Added update-bash section in README
2022-12-04 00:39:17 +02:00
Noah Gorny
cfe46e3d36
Merge pull request #2170 from Royalsspirit/fix/parrot-theme-escape-sequence
...
fix(theme): use correct escape sequence to avoid weird text overwriting
2022-12-04 00:37:47 +02:00
cornfeedhobo
5f59cb5438
remove function wrapper around kubectl alias registration
2022-10-31 08:08:10 -05:00
David Farrell
7c7e4f90ec
bug: Use en_US when fetching EPOCHREALTIME
...
Isolates fetching of EPOCHREALTIME to a function which sets LC_ALL=en_US.UTF-8.
This ensures that the value is in decimal format, regardless of runtime locale.
bug: Hide duration when no command executed
2022-10-30 15:18:09 -07:00
David Farrell
1c9cfd056b
bug:Install shellcheck wget ( #2173 )
...
Installs shellcheck via wget of github release for 'stable' linux version
2022-10-30 15:15:28 -07:00
gmajkic
7c77223b15
fix(theme): use correct escape sequence to avoid weird text overwriting
2022-10-14 09:43:51 +02:00
David Farrell
00062bfcb6
chore: Use grep -E / grep -F instead of egrep / fgrep ( #2164 )
...
Ensures that the -E or -F option, when used, is the first option
* i.e. grep -oE => grep -E -o
Updates _bash-it-grep to invoke grep with just the provided arguments
* This function was (and still is) unused, but decided this new functionality was actually more useful
Introduces _bash-it-fgrep to invoke grep -F
Removes type -P egrep from the _bash-it-*grep functions
For usages that were already going to be modified, use -F if appropriate
* Does not touch grep usages that may have benefited from -F, but were not otherwise considered for this PR
Adds shellcheck header to modified .bash files that didn't already have it
2022-10-13 10:34:57 -07:00
Noah Gorny
bf2034d13d
Merge pull request #2158 from bittner/patch-2
...
Verbose version of `git add` (gav)
2022-09-28 12:04:38 +03:00
Dylan Tuttle
c222e5001c
Merge branch 'update_bash_branch' of github.com:dylanjtuttle/bash-it into update_bash_branch
2022-09-22 16:52:05 -06:00
Dylan Tuttle
606272ac23
Fixed broken code blocks in troubleshooting.rst
2022-09-22 16:49:26 -06:00
Dylan Tuttle
d237ab9aa4
Merge branch 'master' into update_bash_branch
2022-09-22 16:30:51 -06:00
Dylan Tuttle
0ab80429ce
Removed Bash Dependency section from README and added it to troubleshooting.rst
2022-09-22 16:27:52 -06:00
Noah Gorny
8bedbe47a7
Merge pull request #2161 from brianphillips/patch-2
...
Update variable name to match projects.plugin.bash
2022-09-13 20:08:18 +03:00
Brian Phillips
e5e7785c96
Update variable name to match projects.plugin.bash
...
The projects plugin was changed to reference `BASH_IT_PROJECT_PATHS` but the completion was still using `PROJECT_PATHS`
2022-08-30 13:21:03 -05:00
Peter Bittner
3294df5d3e
Verbose version of `git add` (gav)
2022-08-26 07:04:07 +02:00
Noah Gorny
d770030513
Merge pull request #2154 from jakebman/gitlab-runner-deprecation
...
Update Gitlab Runner images
2022-08-17 07:17:42 +03:00
Jake Boeckerman
407f2f5b5f
Update github runner images
...
Github deprecated and will remove two runner images
macos-10.15 will be removed on 2022-08-30
macos-12 is available
https://github.blog/changelog/2022-07-20-github-actions-the-macos-10-15-actions-runner-image-is-being-deprecated-and-will-be-removed-by-8-30-22/
ubuntu-18.04 will be removed on 2022-12-01
ubuntu-22.04 is available
https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/
2022-08-12 11:39:22 -06:00
John D Pell
5a62acd253
Merge pull request #2152 from thomasmerz/issue_2151
2022-08-11 09:08:37 -07:00
Thomas Merz
129340d24d
Issue 2151 🛂 do not give users a root shell by executing arbitrary shell commands by 'vim'
...
also by removing 'sudo' aliases because bash-it should not be
the business of mucking about with sudo at all
2022-08-11 17:22:57 +02:00
Noah Gorny
2ef5d483e3
Merge pull request #2135 from tbhaxor/improve/flutter-completion
...
Clean flutter completions
2022-05-19 00:11:54 +03:00
Noah Gorny
03b3a977aa
Merge pull request #2147 from davidpfarrell/dirs-bks
...
plugin(dirs): Create backup file parent directory
2022-05-19 00:01:58 +03:00
David Farrell
c0dc83edfc
plugin(dirs): Create backup file parent directory
2022-05-09 13:08:52 -07:00
Dylan Tuttle
f2bc6c4e6d
Added update-bash section in README
2022-05-08 00:49:27 -06:00
Noah Gorny
4dddba3bc6
Merge pull request #2145 from tbhaxor/bugfix/docs
...
Upgrade the sphinx version
2022-05-07 23:29:43 +03:00
Gurkirat Singh
c2698882e4
fix (docs): ugraded sphinx version
2022-05-07 00:32:15 +05:30
Gurkirat Singh
135d480c7d
improve (docs): exclude venv pattern in build
2022-05-07 00:31:21 +05:30
Gurkirat Singh
e11576f260
fix (completion): shfmt format flutter.completion.bash
2022-05-06 23:32:47 +05:30
Gurkirat Singh
d7fb6b3235
improve (lint): add completion/available/flutter.completion.bash entry
2022-05-06 23:32:45 +05:30
Noah Gorny
35334cdcb0
Merge pull request #2121 from BarbUk/update/theme_barbuk
...
Update of barbuk theme (add modular blocks)
2022-04-13 00:22:04 +03:00
Noah Gorny
b95094153f
Merge pull request #2139 from tbhaxor/patch-3
...
Improve bashit upgrade function git log and add missing popd
2022-04-06 23:06:52 +03:00
Gurkirat Singh
6ccd9f5adf
fix (helpers): bashit_update function return to source path and --no-merges in log
2022-03-21 08:52:46 +05:30
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
9a71556b99
shfmt needs more spaces
2022-03-09 22:04:18 +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
0068315c35
Update documentation
2022-03-09 21:38:03 +01:00
BarbUk
b839294827
Complete rework
2022-03-09 21:29:51 +01: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
6ba527ff98
feature (alias): add terraform init alias
2022-03-06 11:41:27 +05:30
Gurkirat Singh
55e698a737
fix test file path from the 7fcad6ed0d commit
2022-03-06 04:25:33 +05:30
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
John D Pell
ad1d73aaa1
lib/command_duration: remove temporary files
2022-03-04 12:39:02 -08:00
John D Pell
ca8101b34a
Merge pull request #2031 from gaelicWizard/bats-cleanup
2022-03-04 11:25:06 -08:00
Noah Gorny
9dece7fe58
Merge pull request #2105 from gaelicWizard/bats/upower
...
plugin/battery: fix handling of multiple batteries with `upower`
2022-03-04 20:58:17 +02:00
Noah Gorny
49649c5f0c
Merge pull request #2028 from gaelicWizard/plugin/base
...
lib/appearance: export `$CLICOLOR` instead of `$LSCOLOR`
2022-03-04 20:50:33 +02:00
Noah Gorny
6a53066b05
Merge pull request #2077 from Console-Utils/feature/issue-forms
...
Upgrade to GitHub issue forms
2022-03-04 20:49:54 +02:00
Noah Gorny
53e5965f2d
Merge pull request #2038 from gaelicWizard/theme/base
...
lib/theme: `shfmt`, `shellcheck`, and some cleanup
2022-03-04 20:49:24 +02:00
John D Pell
999b787c92
Close #2082
2022-03-04 00:07:35 -08:00
John D Pell
0286a50fcd
lib/appearance: export `$CLICOLOR` instead of `$LSCOLOR`
...
Alsö, since the *value* of `$CLICOLOR` is not used anywhere, overload it to count the number of colors available for use elsewhere.
2022-03-03 23:58:55 -08:00
John D Pell
f7cba27f10
lib/appearance: `shellcheck` && `shfmt`
2022-03-03 23:58:55 -08:00
John D Pell
029e53a433
plugin/battery: fix handling of multiple batteries with `upower`
2022-03-03 23:45:40 -08:00
John D Pell
6d422f17e4
Revert dc380e9ed6
2022-03-03 23:33:05 -08:00
John D Pell
dc380e9ed6
test/battery: fix tests…
2022-03-03 23:14:33 -08:00
John D Pell
6734baf950
test/base: lose old TravisCS skip
2022-03-03 23:02:29 -08:00
John D Pell
df87b41635
lib/theme: use `_command_exists()` in `rbenv_version_prompt()`
2022-03-03 22:54:09 -08:00
John D Pell
7762aa687a
lib/theme: `local hg_root` in `hg_prompt_vars()`
2022-03-03 22:54:09 -08:00
John D Pell
c9efc161ff
lib/theme: improve performance of `scm()`
...
- Don't invoke the source control utility when all we want to know is if we're somewhere inside the repository; use `_bash-it-find-in-ancestor()`.
2022-03-03 22:54:09 -08:00
John D Pell
d86a182b6e
lib/theme: export `$LS_COLORS` et al
2022-03-03 22:54:09 -08:00
John D Pell
c6ac9109d7
lib/theme: parameter cleanup
...
Improve handling of parameters by adding defaults (often blank).
Alsö, eliminate newlines from `echo` in many places.
2022-03-03 22:54:09 -08:00
John D Pell
2b3af0d8c9
lib/theme: eliminate a lot of subshells
...
A lot of useless `echo`s in here.
2022-03-03 22:54:09 -08:00
John D Pell
ac0d91b682
lib/theme.githelpers: remove dead code
...
Five years deprecation is plenty warning.
2022-03-03 22:54:09 -08:00
John D Pell
1d73537dbf
lib/theme: `shfmt` && `shellcheck`
...
My apologies to future `git blame` hunters ♥
Use the "short" host name by default (`\h`), not the fully qualified domain name (`\H`)...
lib/theme: don't redefine battery_char()
Combine the two definitions for `battery_char()` so the second one doesn't just overwrite the first one. Do one or the other, not both.
Don't evaluate if `battery_percentage()` is available at load time, evaluate it at run time.
Don't run `date` for `$THEME_TIME_FORMAT`, use `\D{fmt}`.
2022-03-03 22:54:09 -08:00
John D Pell
6bacd5fb1c
lib/githelpers: `shfmt` && `shellcheck`
...
My apologies to future `git blame` hunters ♥
2022-03-03 22:54:08 -08:00
John D Pell
fbc5d0a5af
lib/p4helpers: `shfmt`
...
My apologies to future `git blame` hunters ♥
2022-03-03 22:53:13 -08:00
John D Pell
0e0e0d3035
lib/theme: Fix a *few* SC2154
...
These variables are referenced by themes already linted.
2022-03-03 22:53:13 -08:00
John D Pell
a9dda3d358
test/preexec: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
0d55a2406c
test/base: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
f0dfe1a67f
test/theme: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
b686515877
test/xterm: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
a36a4c4038
test/ruby: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
fbf7efa1b8
test/go: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
4a9df8ec88
test/cmd-returned-notify: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
6e2e0af7f9
test/battery: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
beac9c430a
test/aliases: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
fd91211704
test/utilities: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
629a1b0c0d
test/search: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
e5cd10112c
test/log: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
1ddec65d56
test/helpers: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
425ef3e10a
test/composure: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
2a95e983d0
test/install: adopt newly revamped `setup()`
...
test/uninstall: adopt newly revamped `setup()`
test/install: `local_setup_file()`
2022-03-03 22:43:17 -08:00
John D Pell
c837232643
test/bash-it: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
de31a308f9
test/bash_it: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
fd1771d45c
test/base: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
cb9b999f06
BATS: de-parallelize
...
Run the test *files* in parallel, but not the tests *within* the files. This can be reverted after configuration (i.e., `$BASH_IT/enabled` et al) lives *outside* the repo.
2022-03-03 22:43:17 -08:00
John D Pell
014c102b71
BATS: revamp test `setup()` and `setup_test_fixture()`
2022-03-03 22:43:17 -08:00
Noah Gorny
fdff1d81cd
Merge pull request #2103 from Bash-it/revert-2101-add-bashcov-report
...
Revert "ci: Add bashcov codecov report"
2022-03-03 22:39:47 +02:00
Noah Gorny
5c592c9a6f
Revert "ci: Add bashcov codecov report"
2022-03-03 22:37:39 +02:00
Noah Gorny
1722ea963e
ci: Add bashcov codecov report ( #2101 )
2022-03-03 21:37:34 +02:00
Noah Gorny
be755d63af
ci: Add bashcov codecov report
2022-03-02 23:44:42 +02:00
Ira Abramov
be9a838015
Fix knife completion ( #2098 )
...
Co-authored-by: Ira Abramov <github@ira.abramov.org>
2022-03-01 23:22:56 +02:00
Noah Gorny
34bc37c178
Merge pull request #2061 from gaelicWizard/lib/helpers
...
lib/helpers: fixes, improvements, consolations, constellations, and a partridge in a pear tree
2022-03-01 23:21:27 +02:00
John D Pell
789ede9ef3
plugin/battery: fix tests
2022-02-24 12:52:26 -08:00
John D Pell
604f9b0baa
Remove executable bit.
2022-02-24 12:47:22 -08:00
John D Pell
47bbc73744
lib/helpers: `_bash-it-find-in-ancestor()`
...
Use new `composure.sh` feature to avoid `cite()`.
2022-02-24 12:47:22 -08:00
John D Pell
5957d189ea
lib/utilities: `_bash-it-component-item-is-enabled()`
...
- Use normal `if`/`then`
2022-02-20 12:01:05 -08:00
John D Pell
fe48deda2d
lib: rename `_bash-it-clean-component-cache()`
...
…to `_bash-it-component-cache-clean()`
2022-02-20 12:01:05 -08:00
John D Pell
6257853759
lib/utilities: use `$XDG_CACHE_HOME` properly
...
We should fall back to the default location, not use an entirely different one.
2022-02-20 12:01:05 -08:00
John D Pell
72829ca21d
lib/utilities: `_bash-it-component-item-is-enabled()`
...
- required arguments
2022-02-20 12:01:05 -08:00
John D Pell
ffcf8f1c94
lib/utilities: >|
2022-02-20 12:01:05 -08:00
John D Pell
fbd842b2ea
lib/helpers: fix extraneous quotes from `_bash-it-grep()`
2022-02-20 12:01:05 -08:00
EmilySeville7cfg
df1881acfa
Room for extra details for:
...
- bug report
- feature request
2022-02-20 18:47:44 +10:00
EmilySeville7cfg
2927f672fd
More user-friendly hints in bug report
2022-02-20 18:45:08 +10:00
Noah Gorny
33bade22b7
Merge pull request #2073 from gaelicWizard/lib/preexec
...
Update "preexec" from "https://github.com/rcaloras/bash-preexec@master "
2022-02-19 23:56:56 +02:00
Noah Gorny
1c8ad2c1b7
Merge pull request #2096 from akinomyoga/plugin-blesh-workaround-reloader-change
...
bash_it.sh: source `reloader.bash` without arguments for the default enabling
2022-02-19 23:43:20 +02:00
Koichi Murase
ee853670a1
bash_it: suppress a false error by shellcheck
2022-02-19 17:17:45 +09:00
Koichi Murase
41cf3cfaf2
plugin/blesh: override possible arguments inherited by callers
2022-02-19 16:34:22 +09:00
Koichi Murase
e05fa477d7
bash_it: source reloader.bash without arguments for the default enabling
2022-02-19 16:34:22 +09:00
John D Pell
150f73ee50
bash-it update: show change log once
2022-02-18 03:06:17 -08:00
John D Pell
2cea663a4a
lib/theme: handle undefined parameter
2022-02-18 03:06:17 -08:00
John D Pell
95353f1a98
lib/helpers: the last remnants of the `$OSTYPE` have been swept away
...
- Figure out which `sed` we have by checking, not guessing.
2022-02-17 20:46:28 -08:00
John D Pell
ddf75f17ac
lib/search: fix variable scope
2022-02-17 20:46:28 -08:00
John D Pell
35ecc260c2
lib/helpers: handle unbound parameters
2022-02-17 20:46:28 -08:00
John D Pell
31751624c0
lib/helpers: cleanup `_bash-it-profile-load-parse-profile()` a bit
2022-02-17 20:45:37 -08:00
John D Pell
e7818dbaca
lib/helpers: handle unbound positional parameters
...
Alsö, don't `pushd`/`popd` when restarting shell.
2022-02-17 20:45:37 -08:00
John D Pell
60c10004d1
lib/helpers: fix `_bash-it-component-pluralize()`
2022-02-17 20:45:27 -08:00
John D Pell
8246794a28
lib/preexec: the last remnants of the `$OSTYPE` have been swept away
...
- Use a POSIX-compliant/portable extended regular expression to match on word-boundaries, rather than guessing which regex library `bash` was linked against. See https://stackoverflow.com/a/12696899/555333 for explanation and code suggestion.
2022-02-16 16:10:41 -08:00
John D Pell
c1943192ce
lib/preexec: clarify subshell guard and comment
...
Rewrite comment on disabling the `DEBUG` trap in subshells, which is now handled upstream as of rcaloras/bash-preexec#26 .
Alsö, fix the guard variable assignment to allow it to be overridden elsewhere (e.g., for testing).
2022-02-16 16:10:41 -08:00
John D Pell
a93919625d
lib/preexec: adobt `_bash_it_library_finalize_hook`
...
Schedule modification of `$PROMPT_COMMAND` for after everything has loaded.
2022-02-16 16:10:41 -08:00
John D Pell
6b08284928
Update "preexec" from " https://github.com/rcaloras/bash-preexec@master "
...
git-vendor-name: preexec
git-vendor-dir: vendor/github.com/rcaloras/bash-preexec
git-vendor-repository: https://github.com/rcaloras/bash-preexec
git-vendor-ref: fd2ffa8876d3940c97ffdc3cc807e43277cf72da
2022-02-16 16:10:41 -08:00
Noah Gorny
187916d903
Merge pull request #2047 from gaelicWizard/alias/shfmt
...
Aliases: lint the entire folder
2022-02-16 22:47:36 +02:00
Noah Gorny
caae145f5a
Merge pull request #2068 from gaelicWizard/theme/pure
...
theme/pure: cleanup
2022-02-16 22:46:59 +02:00
Noah Gorny
379813b671
Merge pull request #2086 from seefood/ira/fix-dirs
...
Tilde expanstion won't work once it is a quoted string, expanding in advance
2022-02-16 22:45:02 +02:00
Noah Gorny
9d6fe72267
Merge pull request #2088 from gaelicWizard/lib/log
...
lib/log: //echo/printf
2022-02-16 22:18:22 +02:00
Noah Gorny
0b1c65b100
Merge pull request #2092 from punchagan/link-profile
...
lib/helpers: Don't rm "$profile_path" before writing to it
2022-02-16 22:14:28 +02:00
Noah Gorny
b550b99160
Merge pull request #2091 from gaelicWizard/completion/alias
...
completion/aliases: redirection, quote, temp file
2022-02-16 22:12:57 +02:00
Puneeth Chaganti
b3ef9ea209
lib/helpers: Don't rm "$profile_path" before writing to it
...
When the file is being re-created, we write to it, instead of appending to
it. So, the rm here is unnecessary and prevents users from linking the profile
file to another location that is potentially under version control. For
instance, once could link to a profile file located at
"$BASH_IT_CUSTOM/profiles/*.bash_it".
2022-02-16 20:55:08 +05:30
John D Pell
e7b91e7be5
lib/log: use newly supported `composure.sh` feature
...
- these functions can now run even if `composure.sh` has *not* been loaded at all!
2022-02-15 22:20:19 -08:00
John D Pell
61b6393a4a
lib/log: //echo/printf
...
- Replace `echo -e` with `printf` in `_bash-it-log-message()`.
- Local positional parameters to allow for defaults.
- Use `if`/`then` properly.
- Clean up use of `$BASH_IT_LOG_PREFIX` slightly (eliminate duplicate colons).
2022-02-15 22:18:24 -08:00
John D Pell
4ba11dbaa2
completion/aliases: redirection, quote
...
Alsö, some aliases are returned by `alias -p` with `alias -- xxxxx`...which confuses the function, so handle it specially.
2022-02-15 22:09:27 -08:00
Noah Gorny
562eb6ce68
Merge pull request #2083 from tbhaxor/patch-1
...
Remove redundant aliases for clear screen
2022-02-15 22:47:42 +02:00
Noah Gorny
78da4ca760
Merge pull request #2089 from gaelicWizard/plugin/alias-completion
...
completion/aliases: typo
2022-02-15 22:09:44 +02:00
John D Pell
c982a881a2
completion/aliases: typo
2022-02-14 16:00:15 -08:00
John D Pell
12a734cb49
aliases/general: use single quotes as much as possible
2022-02-14 15:40:56 -08:00
John D Pell
27bfc966ac
aliases: add shellcheck headers
2022-02-14 15:40:56 -08:00
John D Pell
604e5c5040
alias/todo.txt-cli: `shellcheck`
2022-02-14 15:40:56 -08:00
John D Pell
665d9e96a8
alias/osx: `shellcheck`
2022-02-14 15:40:56 -08:00
John D Pell
8d30275b8a
alias/msys2: `shellcheck`
2022-02-14 15:40:56 -08:00
John D Pell
ea6cb6afec
alias/laravel: `shellcheck`
2022-02-14 15:40:56 -08:00
John D Pell
826916be4f
alias/homesick: `shellcheck`
...
Alsö, remove impossible alias. If someone wants it, they can write the function, but since aliases literally don't work this way it seems obvious that nobody has ever used it.
2022-02-14 15:40:56 -08:00
John D Pell
11aa32387e
alias/general: `shellcheck`
2022-02-14 15:40:56 -08:00
John D Pell
5748aa20a7
alias/docker: `shellcheck`
2022-02-14 15:40:56 -08:00
John D Pell
7c2c2a5525
aliases: run `shfmt` on the whole folder
...
My apologies to future `git blame` hunters ♥
2022-02-14 15:40:56 -08:00
Ira Abramov
16bf32be65
Merge branch 'master' of https://github.com/Bash-it/bash-it into ira/fix-dirs
...
* 'master' of https://github.com/Bash-it/bash-it : (22 commits)
main: variable name cleanup
lib/history: new functions `_bash-it-history-auto-*()`
plugin/history*search: no need to load after `plugin/history`
plugin/history-eternal: Use `readonly` instead of `export`
plugin/history: don't use `export`
lib/preview: add full completion
lib/helpers: add `preview` to `bash-it` spaghetti
lib/preview: refactor into a function
completion/system: correctly load version when not linked
main: adopt `_bash-it-log-prefix-by-path()`
main: Glob for *.bash properly when path contains spaces
completion/aliases: rename init function
test/battery: require matching battery identifier
test/battery: add multiple-battery edge case
plugin/battery: split `upower` to two variables
completion/alias: add stub file
completion/alias: fix tests
completion/alias: rename
completion/alias: `shfmt` && `shellcheck`
completion/alias: eliminate use of `eval`
...
2022-02-14 10:31:04 +02:00
Noah Gorny
0619c19f65
Merge pull request #2074 from NariyasuHeseri/master
...
plugin/battery: bug fix
2022-02-14 08:22:33 +02:00
John D Pell
363827a3b5
theme/pure: cleanup
...
Use `\$` to let _Bash_ choose the mark, move `PS1=` outside the `case` statement.
#TODO: last command status?
2022-02-13 16:18:00 -08:00
Noah Gorny
561e282585
Merge pull request #2044 from gaelicWizard/completion/alias
...
completion/aliases: eliminate use of `eval`
2022-02-13 23:59:35 +02:00
Noah Gorny
89c9504a5e
Merge pull request #2017 from gaelicWizard/lib/preview
...
lib/preview: functionalize
2022-02-13 23:59:06 +02:00
Noah Gorny
ee135d28da
Merge pull request #2069 from gaelicWizard/completion/system
...
completion/system: correctly load version when not linked
2022-02-13 23:57:35 +02:00
Noah Gorny
253004a599
Merge pull request #1940 from gaelicWizard/history
...
Feature: automatic history management
2022-02-13 23:57:14 +02:00
Noah Gorny
23f9b7416a
Merge pull request #1902 from gaelicWizard/glob
...
Glob for *.bash properly when path contains spaces
2022-02-13 23:53:57 +02:00
Ira Abramov
98889b208c
Tilde expanstion won't work once it is a quoted string, expanding in advance.
2022-02-11 09:56:10 +02:00
John D Pell
146107926e
main: variable name cleanup
2022-02-10 10:46:33 -08:00
John D Pell
5d5858058e
lib/history: new functions `_bash-it-history-auto-*()`
...
Two new functions `_bash-it-history-auto-save()` and `_bash-it-history-auto-load()`, which append new history to disk and load new history from disk, respectively.
See bash-it/bash-it#1595 for discussion.
2022-02-08 16:59:29 -08:00
John D Pell
f6119567e8
plugin/history*search: no need to load after `plugin/history`
...
There's no need for these plugins to load after `plugin/history`. None of the history plugins depend upon each other loading before, after, or at all.
2022-02-08 16:59:29 -08:00
John D Pell
267a721ac6
plugin/history-eternal: Use `readonly` instead of `export`
...
...and hide errors relating to setting already-readonly variables.
`plugin/history-eternal` does not need to force loading after `plugin/history` because both plugins will play nicely with read-only variables, and since we're overwritting and marking read-only then the intended result survives no matter which loads first.
plugin/history-eternal: require Bash v4.3+
Unlimited history is only possible in _Bash_ version 4.3 and up
2022-02-08 16:59:29 -08:00
John D Pell
8052911861
plugin/history: don't use `export`
...
...so the plugin is friendly to variables already marked read-only.
2022-02-08 16:59:29 -08:00
Gurkirat Singh
70dbda053b
Remove redundant aliases for clear screen
2022-02-08 14:49:43 +05:30
Gurkirat Singh
2b8928f2bd
Make the ls color available for macos
2022-02-08 14:27:48 +05:30
John D Pell
00e3955dd3
lib/preview: add full completion
2022-02-07 15:27:03 -08:00
John D Pell
a9a40a3cad
lib/helpers: add `preview` to `bash-it` spaghetti
2022-02-07 15:27:03 -08:00
John D Pell
d6555f369a
lib/preview: refactor into a function
...
This allows future use like `bash-it preview`. Alsö, allows to use `$BASH_PREVIEW` to specify a particular theme to preview instead of just doing all of them.
2022-02-07 15:27:03 -08:00
John D Pell
1480cdfa34
completion/system: correctly load version when not linked
...
- Load the correct version of `bash-completion` even when not "linked".
2022-02-07 15:15:46 -08:00
John D Pell
bc95eceb10
main: adopt `_bash-it-log-prefix-by-path()`
2022-02-06 16:59:03 -08:00
John D Pell
0d346b204f
main: Glob for *.bash properly when path contains spaces
...
- `shfmt`, `shellcheck`
- Clean up legacy/compatibility code to simpler control flow
- Move theme stuff down to where themes are handled
- Don't use `**` as _Bash It_ has never before set `globstar`; this eliminates varying behavior by environment; this alsö fixes users having any not-enabled themes under their custom dir.
- Lose weird Mac-specific alternate shell startup file (Bash loads startup files on Mac the same as it does on any other *nix system.)
- Place `composure.sh` init all in one place
- remove 10-years-deprecated backwards compatibility: Deprecated in `b59ee658f78ec6ff8c6c2754216e0322b7fe18e2` dated 2011-10-29.
2022-02-06 16:59:03 -08:00
EmilySeville7cfg
dfe681d223
Add config for issue forms
2022-02-07 10:51:40 +10:00
EmilySeville7cfg
eb91f4ec69
Refresh feature request:
...
- use issue forms
2022-02-07 10:47:42 +10:00
EmilySeville7cfg
a4e41badf1
Refresh bug report:
...
- use issue forms
2022-02-07 10:43:23 +10:00
Noah Gorny
4dbe92e38d
Merge pull request #2075 from NariyasuHeseri/awk_unterminated_regexp
...
helpers: fix `awk: unterminated regexp`
2022-02-04 11:52:21 +02:00
John D Pell
43df0fe130
completion/aliases: rename init function
...
Use the callback naming convention for the init function, for later use.
2022-02-03 22:49:39 -08:00
John D Pell
302bae9c5f
test/battery: require matching battery identifier
2022-02-03 16:47:17 -08:00
John D Pell
23f7916a4d
test/battery: add multiple-battery edge case
2022-02-03 10:45:27 -08:00
John D Pell
cade0a1e7a
plugin/battery: split `upower` to two variables
2022-02-03 10:45:27 -08:00
Nariyasu Heseri
1e77c26c00
helpers: fix `awk: unterminated regexp`
2022-01-31 23:54:14 +09:00
John D Pell
880488ec9a
completion/alias: add stub file
...
- put a loader to remove the symlink at `enabled/***---alias-completion.plugin.bash`.
2022-01-30 16:13:54 -08:00
John D Pell
b0862899d7
completion/alias: fix tests
2022-01-30 16:13:54 -08:00
John D Pell
7fcad6ed0d
completion/alias: rename
...
There is no reason for this to be in the `plugins` directory, it just needs to have a load priority sufficiently high that it runs after any aliases are defined.
2022-01-30 16:13:54 -08:00
John D Pell
d214621d39
completion/alias: `shfmt` && `shellcheck`
2022-01-30 16:13:54 -08:00
John D Pell
b0f23d8e98
completion/alias: eliminate use of `eval`
2022-01-30 16:13:54 -08:00
Noah Gorny
578c702ca3
Merge pull request #2055 from gaelicWizard/lib/reloader
...
lib/reloader: lint and modernize
2022-01-30 00:10:32 +02:00
Noah Gorny
2a9ee7e344
Merge pull request #2019 from gaelicWizard/lib/colors
...
lib/colors: split out metaprogramming
2022-01-30 00:10:14 +02:00
Noah Gorny
39e5652ee5
Merge pull request #1932 from gaelicWizard/search
...
Lib/search: lint, cleanup, and small fixes
2022-01-30 00:09:49 +02:00
Noah Gorny
1d6f4d747b
Merge pull request #2067 from gaelicWizard/BASH_IT_BASHRC
...
lib/helpers: eliminate assumptions about login shells
2022-01-29 22:42:21 +02:00
Nariyasu Heseri
c794f4f0e7
plugin/battery: use `--max-count` of `grep` instead of `head`
2022-01-29 15:50:36 +09:00
John D Pell
26b402e254
lib/reloader: unset "${!_bash_it_reloader_@}"
2022-01-28 13:58:00 -08:00
John D Pell
4cf2aae36e
lib/search: code cleanup
...
Improve `_bash-it-erase-term()`, `_bash-it-flash-term()`, `_bash-it-rewind()`, `_bash-it-search-result()`, and `_bash-it-search-component()`. Minor tweaks to `_bash-it-is-partial-match()`, and `_bash-it-search()`.
2022-01-28 13:35:17 -08:00
John D Pell
b8694ee140
lib/search: `shfmt`
...
My apologies to future `git blame` hunters ♥
2022-01-28 13:35:17 -08:00
John D Pell
8939e943c5
lib/search: fix usage statement `_bash-it-search()`
...
SC2154
2022-01-28 13:35:17 -08:00
John D Pell
64efe52394
lib/search: fix `_bash-it-flash-term()`
...
1. `$text_black` isn't a parameter provided by _Bash It_. Typo?
2. `$bold_yellow` is meant for prompt strings and putputs `\[`; ditto `$bold_red`.
3. The color was never returned to normal after.
2022-01-28 13:35:17 -08:00
John D Pell
afeb4d6e11
lib/search: `shellcheck`
...
SC2076
SC2091
SC2004
SC2086
SC2207
2022-01-28 13:35:17 -08:00
John D Pell
5478617a89
lib/search: code style cleanup
...
Couldn't even `shellcheck` until I did a first pass...too much noise! ♥
2022-01-28 13:35:17 -08:00
John D Pell
85a77f1e46
lib/colors: Separate metaprogramming
2022-01-28 13:09:53 -08:00
John D Pell
bf4ddf5951
plugin/colors: `shfmt`
2022-01-28 13:09:00 -08:00
John D Pell
399f0265aa
plugin/colors: revert #699
...
This reverts commit 2a3fde2b14 but does *not* restore the previous variables. Those are still provided by `lib/colors`.
This plugin exists for anyone who likes the metaprogramming adventure of computing colors dynamically rather than using hard-coded value. Potentially this could be used by themes, or possibly by a theme color-scheme randomizer?
2022-01-28 13:09:00 -08:00
John D Pell
5f19de8d51
plugin/colors: rename `theme/colors`
2022-01-28 13:09:00 -08:00
John D Pell
16cee1956d
lib/colors: revert #99
...
This reverts bash-it/bash-it#99 , a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in bash-it/bash-it#699 ; I'm just finishing the job.
2022-01-28 13:08:50 -08:00
John D Pell
2a8d8ba540
lib/colors: rename `theme/colors`
2022-01-28 13:08:50 -08:00
Nariyasu Heseri
b87f3067b5
plugin/battery: bug fix
...
When `upower --enumerate | grep -i BAT` returns multiple lines of results (which are file paths),
the added quotation (from commit 3cb5f3f7e6 ) concatenates them all to provide an invalid path.
Thus to make the plugin work as before the commit,
take only the first line of the results.
2022-01-29 03:30:35 +09:00
John D Pell
fd7b20b8d7
reloader: `shellcheck` && `shfmt`
...
Rewrite globbing per `shellcheck`'s SC2013 recommendations, and standardize whitespace.
2022-01-28 03:59:45 -08:00
John D Pell
75d22d865f
lib/reloader: adopt `_bash-it-log-prefix-by-path()`
2022-01-28 03:59:45 -08:00
John D Pell
c08267e25d
lib/helpers: eliminate assumptions about login shells
...
Bash loads initialization files on Mac just the same as it does on Linux or WSL. Our previous assumptions were wrong, and my fix was alsö wrong because I made more assumptions!
This patch eliminates the assumptions. Literally just load either the startup file the shell started with, or fall back to `~/.bashrc`. Don't check `shopt -q login_shell` and don't check `$OSTYPE` or anything else.
2022-01-28 03:59:02 -08:00
Noah Gorny
7e79212dff
Merge pull request #2072 from gaelicWizard/lib/preexec
...
lib/preexec: tests!
2022-01-27 23:55:21 +02:00
John D Pell
2343e2dd35
lib/preexec: tests!
2022-01-27 12:40:38 -08:00
John D Pell
d1d7cd4383
tests: add *.bats to `.editorconfig`
2022-01-27 11:30:35 -08:00
Noah Gorny
056c392a54
lib: preexec: Properly return if there was a conflict in check_*_conflict
...
It goes the other way around!
2022-01-26 18:25:37 +02:00
Noah Gorny
0c24edae06
Merge pull request #2064 from gaelicWizard/plugin/battery
...
plugin/battery: `shellcheck`
2022-01-26 17:47:59 +02:00
Noah Gorny
3c2bc3d196
Merge pull request #2003 from gaelicWizard/preexec
...
Consolidate `preexec`-related functions; Eliminate `vendor/init.d`
2022-01-26 17:34:46 +02:00
Noah Gorny
5a849419ba
Merge pull request #2040 from gaelicWizard/parallel
...
CI: install `parallel` on OSX
2022-01-26 17:29:26 +02:00
John D Pell
3cb5f3f7e6
plugin/battery: `shellcheck`
2022-01-25 23:54:24 -08:00
John D Pell
eeaf59b439
CI: install `parallel` on OSX
...
This should (hopefully) speed up tests!
2022-01-25 13:38:41 -08:00
John D Pell
ae8c9c08a3
lib/preexec: trim whitespace
...
Alsö, use `_bash-it-array-contains-element()`
2022-01-25 13:00:04 -08:00
John D Pell
7770e8cbb9
lib/preexec: log an error if `bash-preexec` not loaded
2022-01-25 13:00:04 -08:00
John D Pell
9f146f937a
lib/preexec: consolidate helper functions
...
Define the helper functions for `bash-preexec.sh` immediately after importing it, rather than in `lib/theme`.
- `__check_precmd_conflict()` and `save_append_prompt_command()` are generally useful and not theme-specific.
- Add matching `__check_preexec_conflict()` and `safe_append_preexec()`.
2022-01-25 13:00:04 -08:00
John D Pell
7a0b353cea
lib/preexec: rename `vendor/init.d/preexec.bash`
2022-01-25 13:00:04 -08:00
Noah Gorny
2575d64deb
Merge pull request #2010 from gaelicWizard/plugin-projects
...
Plugin/projects: cleanup
2022-01-25 18:28:53 +02:00
Noah Gorny
44a1b55db7
Merge pull request #2037 from gaelicWizard/theme/brunton
...
theme/brunton: `shellcheck`
2022-01-25 18:18:54 +02:00
Noah Gorny
878bbe5942
Merge pull request #2042 from gaelicWizard/completion/dotnet
...
completion/dotnet: new completion
2022-01-25 18:16:06 +02:00
Noah Gorny
dd83efc35f
Merge pull request #2041 from gaelicWizard/theme/sudo
...
lib/theme: disable THEME_CHECK_SUDO
2022-01-25 18:12:47 +02:00
Noah Gorny
035eabade6
Merge pull request #2036 from gaelicWizard/theme/norbu
...
theme/norbu: `shellcheck` && `shfmt`
2022-01-25 18:10:21 +02:00
Noah Gorny
80c52b4c25
Merge pull request #2049 from gaelicWizard/CI
...
CI: fix version of OSX runner
2022-01-25 18:07:46 +02:00
Noah Gorny
dcb7038ca3
Merge pull request #2034 from gaelicWizard/README
...
README: Display latest build status from default branch
2022-01-25 17:57:06 +02:00
Noah Gorny
457a279263
Merge pull request #2029 from gaelicWizard/completion/bash-it
...
completion/bash-it: lint and simplify
2022-01-25 17:56:34 +02:00
John D Pell
b1e922ea38
theme/norbu: `shellcheck` && `shfmt`
...
# Conflicts:
# clean_files.txt
2022-01-25 00:01:27 -08:00
John D Pell
4779c8c380
README: Display latest build status from current branch
...
This displays the build/test status of the latest commit to HEAD, not neccessarily `master` branch, from whichever fork it's read from.
2022-01-24 21:53:57 -08:00
John D Pell
5f9a3f143f
completion/bash-it: rename `_bash-it-comp()`
...
...to `_bash-it()`.
The norm is for the completion function for, e.g., `teh_cmd`. to be named with the same name and a prepended underscore, i.e. `_teh_cmd`. This alsö reduces namespace confusion, which will be relevant in a future patch.
2022-01-24 21:41:23 -08:00
John D Pell
2f4ed49a71
completion/bash-it: adopt `_compreply_candidates()`
2022-01-24 21:41:13 -08:00
John D Pell
e1e971c0ea
completion/bash-it: use `read -a` to populate `$COMPREPLY`
...
This allows for spaces and special characters in file names, i.e. internaltional/unicode words.
2022-01-24 21:41:13 -08:00
John D Pell
3874ad85c2
completion/bash-it: use existing functions
2022-01-24 21:41:13 -08:00
John D Pell
d7695d5456
completion/bash-it: `shfmt`
2022-01-24 21:41:13 -08:00
Noah Gorny
dbb3ea4736
Merge pull request #2035 from gaelicWizard/theme/pete
...
theme/pete: `shellcheck` && `shfmt`
2022-01-24 23:32:58 +02:00
Noah Gorny
edc36795b5
Merge pull request #2030 from gaelicWizard/bats
...
Update BATS
2022-01-24 23:29:00 +02:00
Noah Gorny
7e54aea8c7
Merge pull request #1934 from gaelicWizard/helpers
...
lib/helpers: lint, cleanup, & improvements
2022-01-24 23:28:03 +02:00
Noah Gorny
4ba1ab9fd7
Merge pull request #2018 from gaelicWizard/lib/helpers-base
...
lib/helpers: fix `_command_exists()`
2022-01-24 23:27:05 +02:00
John D Pell
18536ed892
template: Add `$THEME_CHECK_SUDO`
2022-01-24 11:46:16 -08:00
John D Pell
21942f6275
lib/theme: disable THEME_CHECK_SUDO
...
Move `$THEME_CHECK_SUDO` to `lib/them`, and set it to `false` instead of `true`.
2022-01-24 11:46:16 -08:00
souhaiebtar
a312e5a9b9
fix wrong function name in `helpers.bash`
...
when i tried to install, i got a message `_bash-it-pluralize-component` command not found; after checking `utilities.bash` the correct function name was `_bash-it-component-pluralize`
2022-01-22 12:33:33 +00:00
John D Pell
a78d72eed1
plugin/projects: refactor a bit
2022-01-18 20:47:08 -08:00
John D Pell
46df804ad9
CI: fix version of OSX runner
...
Now that Mac OS X is "version 11", the "minor" version is no longer relevant.
Alsö, clean up the run conditions.
2022-01-18 16:36:19 -08:00
John D Pell
1ec48c8d71
plugin/projects: add to `template/bash_profile`
2022-01-18 11:08:51 -08:00
John D Pell
ea2002a2e4
plugin/projects: cleanup
...
I'm deliberately leaving the possibility that one might `pjo` without a project name...
2022-01-18 11:08:51 -08:00
John D Pell
0f0093dd4b
lib/helpers: quotes for consistency
...
Quote some parameter uses that don't strictly require it, but since Bash needs so many quotes everywhere else my brain worms feel better when these are quoted too.
lib/helpers: simplify some quote escapes
2022-01-18 11:06:21 -08:00
John D Pell
dfc3fa4339
lib/helpers: delete `_bash-it-determine-component-status-from-path()`
...
Duplicate function of existing `_bash-it-component-item-is-enabled()`.
2022-01-18 11:06:21 -08:00
John D Pell
62b5297dc2
lib/utilities: autonomize `_bash-it-component-item-is-enabled()`
2022-01-18 11:06:21 -08:00
John D Pell
22b290b94f
lib/helpers: simplify some functions
...
- add some `local` variables,
- don't subshell `_typeset_functions`,
2022-01-18 11:02:37 -08:00
John D Pell
bc25810069
lib/helpers: juse use `awk`, insteado of `grep | awk`
2022-01-18 11:02:37 -08:00
John D Pell
805eab804c
lib/helpers: fix profile subcommand tests
2022-01-18 11:02:37 -08:00
John D Pell
4719e43d0b
lib/helpers: remove weird non-globs
...
Replace weird non-globs with array and loop, as suggested by `shellcheck`. Alsö, simplify several constructs to eliminate external binaries.
Alsö, see mvdan/sh issue 558
lib/helpers: unbound positional parameters
2022-01-18 11:02:37 -08:00
John D Pell
251e23a3fa
lib/helpers: use `awk` to count lines instead of piping to `wc -l`
...
Co-authored-by: Kostas Giapis <45879751+tsiflimagas@users.noreply.github.com>
2022-01-18 11:02:37 -08:00
John D Pell
317ff77810
lib/helpers: be extra careful with word splitting
...
Use curly braces when `$1` is unseparated from words in a string.
2022-01-18 11:02:37 -08:00
John D Pell
550f808884
lib/helpers: fix `_bash-it-describe()`
...
Use `_bash-it-component-item-is-enabled()`
Fix SC2295
2022-01-18 11:02:37 -08:00
John D Pell
4c473853e9
lib/helpers: cleanup
...
- Improve `pushd`/`popd` somewhat
- local some parameters
- Lose weird Mac-specific alternate shell startup file (Bash loads startup files on Mac the same as it does on any other *nix system.)
2022-01-18 11:02:37 -08:00
John D Pell
003b0ce802
lib/helpers: `shfmt`
...
My apologies to future `git blame` hunters ♥
2022-01-18 11:02:36 -08:00
John D Pell
6ed006a167
lib/helpers: second `shellcheck` pass
...
lib/helpers: lint `_bash-it-migrate()`
lib/helpers: lint `_disable-thing()`
lib/helpers: lint `_enable-thing()`
lib/helpers: lint `_help-list-aliases()`
lib/helpers: lint `_help-plugins()`
lib/helpers: some SC2034 fixes
And SC2154 in `_make_reload_alias()`
lib/helpers: lint `all_groups()`
2022-01-18 11:02:21 -08:00
John D Pell
5eab3bd288
lib/helpers: first `shellcheck` pass
...
Quote things, SC2268, SC2143, SC2181, SC2162, SC2016, SC2013, &c.
Rewrite globbing per `shellcheck`’s SC2013, and alsö s/typeset/local/g. Eliminate `compgen` where possible.
Alsö: use the existing utility functions `_bash-it-get-component-type-from-path` and `_bash-it-get-component-name-from-path`, which just use parameter substitution anyway. Why was `sed` here?
Alsö, don't add not-existing directories to `$PATH` in `pathmunge()`.
Finally, merge PR #1865 from NoahGorny...and clean it a bit...
2022-01-18 11:02:21 -08:00
John D Pell
9b51dc0b5f
lib/helpers: fix `_command_exists()`
...
The weird subshell is weird AF. Just do a normal `if`.
Ditto `_binary_exists()`, `_completion_exists()`, and `_is_function()`!
2022-01-18 11:02:10 -08:00
John D Pell
180fb93df8
lib/helpers: fix `all_groups()`
...
- Don't write to disk, just pipe.
- Don't loop, just do all functions.
Performance of old implementation on my system:
```
real 0m9.996s
user 0m5.318s
sys 0m9.126s
```
Performance of new implementation on my system:
```
real 0m0.052s
user 0m0.069s
sys 0m0.025s
```
2022-01-18 11:02:10 -08:00
Noah Gorny
973a1f9b40
Merge pull request #1958 from gaelicWizard/plugin-proxy
...
plugin/proxy: lint
2022-01-18 19:42:32 +02:00
Noah Gorny
e116288b83
Merge pull request #2027 from gaelicWizard/lib/composure
...
Update `vendor/composure`
2022-01-18 19:40:41 +02:00
Noah Gorny
fd35094463
Merge pull request #2004 from gaelicWizard/finalize
...
Create lib finalize hook
2022-01-18 19:40:05 +02:00
Noah Gorny
8d5d9073ce
Merge pull request #1999 from gaelicWizard/utilities
...
lib/utilities: refactor `_bash-it-pluralize-component()` & other improvements
2022-01-18 19:39:45 +02:00
Noah Gorny
bdf9a2bca3
Merge pull request #1959 from gaelicWizard/log
...
Lib/log: linting and small improvements
2022-01-18 19:39:24 +02:00
John D Pell
77c5f8eda9
completion/dotnet: modernize
...
and `shfmt`
2022-01-12 22:39:49 -08:00
John D Pell
1a48bcc852
completion/dotnet: new completion
...
See: https://docs.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete#bash
2022-01-12 22:20:25 -08:00
John D Pell
27ebc585be
theme/brunton: SC2154
...
Handle all unbound parameters, even colors!
2022-01-12 13:38:10 -08:00
John D Pell
8e8fe69db4
theme/pete: `shellcheck` && `shfmt`
2022-01-12 13:29:40 -08:00
John D Pell
9291b46b15
test_lib: update BATS to latest tag(s)
...
And fix any failing tests.
2022-01-10 00:27:39 -08:00
John D Pell
d4b4995e2a
Update "composure" from " https://github.com/erichs/composure@master "
...
git-vendor-name: composure
git-vendor-dir: vendor/github.com/erichs/composure
git-vendor-repository: https://github.com/erichs/composure
git-vendor-ref: master
2022-01-09 00:54:30 -08:00
John D Pell
7430a06ec2
lib/utilities: Use variable indirection
...
Don't use `local -n var` so that we can support v3.2...
Note: function names and variable names are different namespaces, so we can have a variable named the same as the function...which makes it really easy to predict default names for results when returning this way.
2022-01-09 00:53:39 -08:00
John D Pell
2b5e531396
lib/utilities: update `_bash-it-component-cache-file()`
...
Match idiom of `_bash-it-component-singularize()`
2022-01-09 00:53:39 -08:00
John D Pell
4f700dfb3b
lib/utilities: rewrite _bash-it-component-pluralize
...
Fix up and rename `_bash-it-pluralize-component()` to `_bash-it-component-pluralize()`, and add matching function `_bash-it-component-singularize()`.
2022-01-09 00:53:39 -08:00
John D Pell
c3eaa606de
lib/utilities: fix `_bash-it-component-help()` for long component names
...
Alsö, minor tweak to `_bash-it-array-contains-element()` for clarity.
This fixes Bash-It/bash-it#1978 .
2022-01-09 00:53:39 -08:00
John D Pell
e3bd30f98d
lib/utilities: autonomize `_bash-it-component-item-is-enabled()`
...
Make `_bash-it-component-item-is-enabled()` operate *without* using `_bash-it-component-help()`...so it's now *much* faster.
2022-01-09 00:53:39 -08:00
John D Pell
e71ea4ad02
lib/log: function `_bash-it-log-prefix-by-path()`
...
...to replace `_set-prefix-based-on-path()` in `scripts/reloader`.
Deliberately does not use `_bash-it-get-component-name-from-path()`/`_bash-it-get-component-type-from-path()` as we need some of the intermediate state and would have to reimplement anyway.
2022-01-09 00:49:44 -08:00
John D Pell
6dec28b5df
lib/log: rename `_log_general()`
...
...to `_bash-it-log-message()`.
alsö, add common log levels with common names.
2022-01-09 00:49:44 -08:00
John D Pell
b772e6ace7
lib/log: `shellcheck` && `shfmt`
...
Alsö, fix tests to load `lib/colors` instead of `lib/appearance`...wut
Alsö, `short-circuit _has_colors()`: If we already looked up colors, and we already have them, then don't run `tput` again.
My apologies to future `git blame` hunters ♥
2022-01-09 00:49:44 -08:00
John D Pell
dc45958a8e
finalize: first attempt at documentation?
2022-01-09 00:46:51 -08:00
John D Pell
bdaf29f84c
Create lib finalize hook
...
Create an array `_bash_it_library_finalize_hook` and loop at the end of the main `bash_it.sh` to run each element in the array.
The purpose here is to run some command after everything else has been loaded. For example, the appearance lib checks for executables for SCM commands, but `$PATH` may be altered after appearance has loaded and therefore some available commands may never be discovered. Therefore, create `_bash_it_appearance_scm_init()` and add it to the hook. It will re-check at end of `bash_it.sh` just before prompt is first displayed.
2022-01-09 00:46:51 -08:00
John D Pell
6e480d7a8a
plugin/proxy: `shellcheck` && `shfmt`
...
plugins/proxy: use `_command_exists()`
Alsö, quote variables, handle unbound parameters, &c.
2022-01-09 00:40:49 -08:00
Noah Gorny
86c1e3c043
Merge pull request #1980 from gaelicWizard/themes-SC2154-B
...
Themes: `shellcheck` (SC2154); Part B
2022-01-09 01:13:49 +02:00
Noah Gorny
f2bff34493
Merge pull request #2013 from gaelicWizard/completion/system
...
completion/system: load earlier than others
2022-01-09 01:13:23 +02:00
Noah Gorny
1fd601db7f
Merge pull request #2007 from gaelicWizard/plugin-latex
...
Plugin/LaTeX: 2009 was thirteen years ago
2022-01-09 01:11:41 +02:00
Noah Gorny
21e7c1f00c
Merge pull request #2011 from gaelicWizard/plugin-nginx
...
plugin/nginx: cleanup
2022-01-09 01:11:06 +02:00
Noah Gorny
af801cfadc
Merge pull request #2014 from gaelicWizard/plugin/gif
...
plugin/GIF: use `type -p` and lint
2022-01-09 01:10:43 +02:00
Noah Gorny
46f343461c
Merge pull request #1953 from gaelicWizard/SVN
...
completion/svn: import existing, remove copy
2022-01-09 01:10:16 +02:00
Noah Gorny
4ec1b5f3e7
Merge pull request #2002 from gaelicWizard/bats
...
tests: path quoting and boilerplate
2022-01-09 01:04:12 +02:00
John D Pell
fcbe4e90b7
theme/easy: SC2154
...
Handle all unbound parameters, even colors!
2022-01-08 08:45:52 -08:00
John D Pell
c7c447a54b
theme/candy: SC2154
...
Handle all unbound parameters, even colors!
2022-01-08 08:45:52 -08:00
John D Pell
262e55eda2
theme/bobby: SC2154
...
Handle all unbound parameters, even colors!
2022-01-08 08:45:52 -08:00
John D Pell
6db5f38f6e
theme/atomic: lint/cleanup
...
Use `[[` instead of `[`, set some local variables, still more to clean
2022-01-08 08:45:35 -08:00
John D Pell
079652e6e7
plugin/nginx: cleanup
...
Dont overwrite user-set variable, and quote path. Local some variables, `shellcheck`, `shfmt`
2022-01-08 08:44:05 -08:00
John D Pell
2fe9e01051
plugins/latex: 2009 was 12 years ago
...
Locate the currently installed edition, instead of transpoting us back to undergrad.
2022-01-08 08:43:32 -08:00
John D Pell
ce22710e00
plugin/gif: `shfmt`
...
My apologies to future `git blame` hunters ♥
2022-01-08 08:43:17 -08:00
John D Pell
b1b08de626
plugins/gif: use `type -p`
2022-01-08 08:43:00 -08:00
John D Pell
04c7424de5
completion/system: fix tests for `profile` command
2022-01-08 08:33:16 -08:00
John D Pell
5fab574bfd
completion/system: `shfmt`
...
My apologies to future `git blame` hunters ♥
2022-01-08 08:33:16 -08:00
John D Pell
e7c3263f12
completion/system: load earlier than other completions
...
I chose `325` so that it's still possible to deliberately place something *before* this component, if needed somehow.
2022-01-08 08:33:16 -08:00
John D Pell
776d0b7d37
completion/svn: rename to match prior file
...
This way, users don't need to enable "subversion" if they had already enabled "svn".
2022-01-08 08:32:37 -08:00
John D Pell
ae5131aee2
completion/subversion: load system completion
...
Load the completion script from the subversion package installed on the system, instead of bundling a copy. This addresses Bash-it/bash-it#1818 .
NOTE: If `completions/system` is enabled, then it will load this same file anyway automatically.
2022-01-08 08:32:37 -08:00
John D Pell
bb69edd795
completion/subversion: remove
...
Remove duplicate of subversion completion as it is already provided by system packages.
2022-01-08 08:32:37 -08:00
John D Pell
8a226a73f1
test/test-helper: support 'plumbing' metadata
2022-01-08 08:29:13 -08:00
John D Pell
30ca1bfba2
test/test_helper: exclude bad symlink
...
Symlink `/test_lib/bats-core/test/fixtures/parallel/suite/helper.bash` references a not-existing file, but it's in a submodule so I can't just fix it. Exclude it from `rsync` in `setup_test_fixture()`.
2022-01-08 08:29:13 -08:00
John D Pell
97ef5a8087
test/run: lint
2022-01-08 08:29:13 -08:00
John D Pell
61e1d6aec2
lib/utilities: simplify test flow
...
This subshell is...wut
2022-01-08 08:29:13 -08:00
John D Pell
c35ed44cbf
plugins/ruby: tests on Mac OS X
...
Test was failing only on Mac OS X for some reason, so refactor a little. It turned out to be due to explicitly setting `$HOME` *after* loading the plugin.
2022-01-08 08:29:13 -08:00
John D Pell
21a2198a12
test/theme: make fewer assumptions
...
Literally copying a line from the source to be tested is perhaps not the best way to test that code. 😉
That said, we do want to verify that the function was actually loaded.
TODO: actually test the function.
2022-01-08 08:29:13 -08:00
John D Pell
6030767b4e
test/theme: load colors
2022-01-08 08:29:13 -08:00
John D Pell
da6b27166f
tests: new file `test_helper_libs.bash`
...
For testing non-core files, just `load ../test_helper_libs` after `load ../test_helper` instead of trying to guess which libs must be loaded, in which order, for testing to succeed.
`_command_exists` spews log messages, so our test log is littered with `_log_debug not found`. This fixes that too.
2022-01-08 08:29:13 -08:00
John D Pell
9dcbeec7ad
tests: test_helper already loads `composure.sh`
...
...and `cite()`s metadata
2022-01-08 08:29:13 -08:00
John D Pell
b2279b7237
tests: quote paths
2022-01-08 08:29:13 -08:00
Noah Gorny
b846c86dbb
Merge pull request #1991 from noviicee/issue-1206
...
Added alias ls='ls -F'
2022-01-07 09:10:44 +02:00
Noah Gorny
2e968c459c
Merge pull request #1989 from tsiflimagas/bashit-completions-performance
...
Bash-it completions performance improvement
2022-01-07 08:55:46 +02:00
Noah Gorny
6fc47a7671
Merge pull request #2021 from NariyasuHeseri/master
...
theme/powerline: fix error `scm: parameter not defined`
2022-01-07 08:51:00 +02:00
Noah Gorny
931f27ee3e
Merge pull request #2016 from gaelicWizard/plugin/python
...
plugin/python: OS detection & `shfmt`
2022-01-07 08:50:07 +02:00
Noah Gorny
2728f20354
Merge pull request #2012 from gaelicWizard/theme/essential
...
theme/essential: cleanup
2022-01-07 08:48:16 +02:00
Noah Gorny
a538844c3b
Merge pull request #1997 from georgettica/patch-1
...
feat(git): make auto squashing non-interactive
2022-01-07 08:46:58 +02:00
Noah Gorny
c060eb46ea
Merge pull request #2001 from gaelicWizard/plugin-dirs
...
Plugin/dirs: use `$XDG_STATE_HOME`
2022-01-07 08:42:24 +02:00
Noah Gorny
dba610cdc8
Merge pull request #2009 from gaelicWizard/plugin-man
...
Plugin/man: Add `R` to `$LESS`
2022-01-07 08:41:41 +02:00
Noah Gorny
5d68fca7e5
Merge pull request #2008 from gaelicWizard/plugin-osx
...
Plugin/OSX: cleanup
2022-01-07 08:41:17 +02:00
Noah Gorny
48a1ff7fb4
Merge pull request #2005 from gaelicWizard/plugin-todo
...
Plugin/todo: cleanup and simplify
2022-01-07 08:40:52 +02:00
Noah Gorny
682b51c195
Merge pull request #2015 from gaelicWizard/plugin/git-subrepo
...
plugin/git-subrepo: use `$HOME` instead of `~`
2022-01-07 08:31:49 +02:00
Nariyasu Heseri
9d8002226d
theme/powerline: fix error `scm: parameter not defined`
2022-01-06 18:44:18 +09:00
John D Pell
139baedf5d
plugin/python: Pyton 2 is dead; Long Live Python 3!
2022-01-05 13:29:35 -08:00
John D Pell
f2dcb2aff6
theme/essential: s/echo/printf/g
2022-01-03 20:45:39 -08:00
John D Pell
3695862b43
theme/essential: cleanup
...
Lose a couple of useless `echo`s/subshells.
Alsö, lose the incorrect VIM modeline from the bottom. Our formatting standard is specified in `$BASH_IT/.EditorConfig`.
2022-01-03 20:45:39 -08:00
John D Pell
d1b7166358
theme/essential: `shfmt`
2022-01-03 20:45:39 -08:00
John D Pell
9f79848eed
theme/essential: SC2154
...
Handle all unbound parameters, even colors!
2022-01-03 20:45:39 -08:00
noviicee
1305a86136
Changed alias name
2022-01-03 23:43:40 +05:30
noviicee
201827ddff
Merge branch 'master' of git://github.com/Bash-it/bash-it into issue-1206
2022-01-03 23:38:33 +05:30
Noah Gorny
c81c9dcc8c
Merge pull request #1865 from NoahGorny/add-profile-subcommand
...
add profile subcommand
2022-01-03 14:00:39 +02:00
Noah Gorny
f0abc3fbc4
Merge pull request #1998 from tsiflimagas/fzf-plugin
...
Fix checking whether fzf is already in PATH
2022-01-03 13:33:14 +02:00
John D Pell
29216c0fd4
plugin/python: `shfmt`
...
My apologies to future `git blame` hunters ♥
2022-01-01 23:00:48 -08:00
John D Pell
dd911f1256
plugins/python: code style improvements
...
Use shell functionality to avoid invoking external binaries, and quote some stuff. Alsö, use $EDITOR and related variables in order to fall through if some aren't defined.
2022-01-01 23:00:48 -08:00
John D Pell
c030f2108b
plugin/git-subrepo: `shellcheck`
2022-01-01 22:48:01 -08:00
John D Pell
a99b597217
plugin/git-subrepo: use `$HOME` instead of `~`
...
If the outer variable is double-quoted, then the default expansion when undefined does not get tilde-expanded. Use `$HOME`.
2022-01-01 22:32:03 -08:00
John D Pell
d6bcedfa96
plugin/base: rewrite `t()` function to use `todo.sh`
...
Move the test for whether `plugin/todo` is enabled inside the function, and remove the alias from there.
Alsö, respect `$XDG_STATE_HOME` and move the old `~/.t` file if it exists.
2022-01-01 17:50:55 -08:00
John D Pell
02b57a83ef
plugins/todo: lint
...
plugin/base: use `_bash-it-component-item-is-enabled()`
2022-01-01 17:50:55 -08:00
John D Pell
45aeb86c21
plugin/osx-timemachine: abuse `$SUDO_COMMAND`
...
Use `$SUDO_COMMAND` as a back-channel to `ssh-askpass` to set a reasonable title if it pops up.
2022-01-01 17:50:22 -08:00
John D Pell
03653fc141
plugins/osx-timemachine: `shellcheck` && `shfmt`
...
Use bash functionality rather than external binaries. Alsö, if $SUDO_ASKPASS is set then pass -A to sudo.
2022-01-01 17:50:22 -08:00
John D Pell
caa0d48c60
plugin/osx: move `$OSTYPE` check to top of file
2022-01-01 17:50:22 -08:00
John D Pell
db9027989d
plugin/osx: remove `dock-switch()`
...
...it hasn't worked in *years*
2022-01-01 17:50:22 -08:00
John D Pell
75aabd5d20
plugin/osx: `shellcheck` && `shfmt`
...
plugins/osx: dead code removal
No need for gymnastics to determine if variable had been exported priort to modification. If it was, then it still is. See man bash(1).
2022-01-01 17:50:22 -08:00
John D Pell
dc5c9e107c
plugin/man: simplify
...
Don't overwrite variables that the user has already set.
plugins/man: unbound `$LESS`
2022-01-01 17:49:45 -08:00
John D Pell
290aab4efe
plugins/man: Add "R" to `$LESS`
...
Otherwise, `-R` must be added on the command line or colors just won't be rendered and these variables will be ignored.
2022-01-01 17:49:45 -08:00
John D Pell
8b308df939
plugin/dirs: use `$BASH_IT_DIRS_BKS.new` instead of `~/.dirs1`
2022-01-01 17:49:15 -08:00
John D Pell
71b4f3c1bc
plugin/dirs: `shfmt` && `shellcheck`
2022-01-01 17:49:15 -08:00
John D Pell
d8e7b173b5
plugins/dirs: use XDG_STATE_HOME
...
Locate the bookmarks file in $XDG_STATE_HOME, and migrate an existing file from the old location if it exists.
2022-01-01 17:49:15 -08:00
John D Pell
4abafc55ef
tests: quote paths
2022-01-01 17:46:11 -08:00
Noah Gorny
2e51e92699
Merge pull request #2000 from gaelicWizard/lint
...
Revert most of "Fix linting errors that snuck in."
2022-01-01 23:01:09 +02:00
Noah Gorny
c5d3b258ab
Merge pull request #2006 from gaelicWizard/plugin-java
...
Plugin/Java: quote path and provide useful error message
2022-01-01 22:56:21 +02:00
Noah Gorny
2dd4426a7c
Merge branch 'master' into plugin-java
2022-01-01 22:53:18 +02:00
Noah Gorny
c852360a39
Merge pull request #1977 from gaelicWizard/themes-SC2154-A
...
Themes: fix `shellcheck` (SC2154); Part A
2022-01-01 22:51:35 +02:00
Noah Gorny
f534505357
Merge pull request #1969 from gaelicWizard/plugin-jekyll
...
Plugin/jekyll: lint and stuff
2022-01-01 22:43:36 +02:00
Noah Gorny
475952dbb9
Merge pull request #1928 from gaelicWizard/defaults
...
Refactor completion for `defaults` command
2022-01-01 16:46:14 +02:00
John D Pell
33df3a2bcd
plugin/java: show message on missing *or* blank
2021-12-30 22:35:34 -08:00
John D Pell
f03a89836e
plugins/java: quote path && `shfmt`
...
Provides an error message if no file is specified.
2021-12-30 20:25:19 -08:00
Kostas Giapis
45e8c4e3cd
Handle `restart` completions
2021-12-30 17:03:23 +02:00
Kostas Giapis
2a2cc72541
Make parameter truncation greedy
2021-12-30 17:01:22 +02:00
Kostas Giapis
1c03eb6b3b
Fix checking whether fzf is already in PATH
2021-12-28 06:54:25 +02:00
John D Pell
64f75ce22d
Revert most of "Fix linting errors that snuck in."
...
This reverts commit 2c8ee40566 .
- _Shellcheck_ documentation for the [`source-path`]( https://github.com/koalaman/shellcheck/wiki/Directive#source-path ) directive indicates this is correct usage. We're `source`ing the `bash-preexec.sh` file from inside the `vendor/github.com/rcaloras/bash-preexec` directory. If we used the [`source`]( https://github.com/koalaman/shellcheck/wiki/Directive#source ) directive, then the full complete path to the file itself would need to be specified.
- Fix `disable=1090` to `disable=SC1090` and remove duplicate lines since this `shellcheck` directive will apply to the entire if-ladder.
- Disabling `SC2154` is almost never appropriate. In this case, several `_git_bash_completion*` variables are expressly assigned in this file, so there is no "unknown" to ignore.
Aside: the `${!_git_bash_completion@}` construct will expand to all variables starting with the previx `_git_bash_completion`, so this line is just a shorthand way to clear all our variables concisely without forgetting any.
2021-12-27 16:18:20 -08:00
John D Pell
3fe9c8d6bc
plugin/jekyll: try to shorten the flow
...
Alsö, use `pushd`/`popd` instead of `builtin cd`.
Alsö, SC2153
2021-12-27 12:22:42 -08:00
John D Pell
e38eeefc5f
plugin/jekyll: second `shellcheck` pass
2021-12-27 12:22:42 -08:00
John D Pell
c0aad51afd
main: move Jekyll stuff to plugins/jekyll
...
If the user doesn't load the Jekyll plugin, then don't load any Jeykll stuff.
2021-12-27 12:22:42 -08:00
John D Pell
1c3a7ffdb3
plugin/jekyll: `shfmt` && `shellcheck`
...
Use bashisms, remove suplerfous variable, use parameter default value replacement
2021-12-27 12:22:42 -08:00
John D Pell
2991aa66ca
theme/powerline: SC2154, SC2248
2021-12-27 12:20:46 -08:00
John D Pell
c323357067
theme/purity: SC2154
...
Handle all unbound parameters, even colors!
2021-12-27 12:20:46 -08:00
John D Pell
e560e88814
theme/pure: SC2154
...
Handle all unbound parameters, even colors!
2021-12-27 12:20:46 -08:00
John D Pell
895102edeb
theme/codeword: SC2154
...
Handle all unbound parameters, even colors!
2021-12-27 12:20:46 -08:00
John D Pell
4bc83d7940
theme/bira: SC2154
...
Handle all unbound parameters, even colors!
2021-12-27 12:20:46 -08:00
John D Pell
2c14a18483
theme/bakke: fix SC2154
...
Handle all unbound parameters, even colors!
2021-12-27 12:20:46 -08:00
John D Pell
c769234350
theme/90210: fix SC2154
...
Handle all unbound parameters, even colors!
2021-12-27 12:20:46 -08:00
John D Pell
6a41dbc3f6
Add "bash-progcomp" from " https://github.com/gaelicWizard/bash-progcomp@v2.0.1 "
...
git-vendor-name: bash-progcomp
git-vendor-dir: vendor/github.com/gaelicWizard/bash-progcomp
git-vendor-repository: https://github.com/gaelicWizard/bash-progcomp
git-vendor-ref: v2.0.1
2021-12-27 11:36:38 -08:00
John D Pell
fdb50aec6b
Remove defaults completion v1
2021-12-27 11:36:38 -08:00
Ron Green
559cde151b
feat(git): make auto squashing non-interactive
2021-12-22 18:49:39 +02:00
Noah Gorny
84383cb46b
Merge pull request #1994 from Novite5/master
...
"pipenv --completion" is obsoleted
2021-12-18 21:52:29 +02:00
Noah Gorny
8edbdf9bbd
Merge pull request #1992 from davidpfarrell/dirs
...
plugin(dirs): remove shopt -s cdable_vars
2021-12-18 21:52:18 +02:00
Novite5
1065d98dbe
"pipenv --completion" is obsoleted
...
Reference: https://buildmedia.readthedocs.org/media/pdf/pipenv/latest/pipenv.pdf 4.2.18 Shell Completion
2021-12-12 18:11:21 +08:00
Kostas Giapis
476159eab9
Use bash features as much as possible
2021-12-11 17:48:33 +02:00
Kostas Giapis
15fe122c1f
Make more variables local
2021-12-03 06:31:28 +02:00
Kostas Giapis
4d821338a3
Double quote some variables
2021-12-03 06:31:28 +02:00
Kostas Giapis
9c4f7773b9
Improve performance for the rest of bash-it completions
2021-12-03 06:31:16 +02:00
Kostas Giapis
5b29d3c6e6
Improve performance of 'bash-it enable' completions
2021-12-03 06:29:39 +02:00
David Farrell
1bc56b1d8f
plugin(dirs): remove shopt -s cdable_vars
2021-12-02 13:42:29 -08:00
noviicee
51042c2cf0
added alias ls='ls -F'
2021-12-02 23:49:58 +05:30
cornfeedhobo
1882f50aa1
Merge pull request #1982 from cornfeedhobo/align-history-plugins
...
Wholesale cleanup of all history plugins
2021-12-02 09:44:09 -06:00
cornfeedhobo
2c8ee40566
Fix linting errors that snuck in.
2021-12-02 09:14:01 -06:00
cornfeedhobo
bdb5289660
Wholesale cleanup of all history plugins
...
- remove the use of redundant cite
- minor cleanups to history.plugin.bash
- set explicit load orders for history-search and history-substring-search
- add new plugin history-eternal
- replace superfluous trap for managing HISTTIMEFORMAT changes
2021-12-02 09:13:56 -06:00
Noah Gorny
036cf8ada0
Merge pull request #1987 from mikejamestx/dtml-scm_prompt
...
Themes: Fix doubletime_multiline scm_prompt
2021-11-29 23:59:24 +02:00
Mike James
1273504267
themes: fix doubletime_multiline scm_prompt
...
Replace doubletime_scm_prompt with scm_prompt.
2021-11-26 13:21:07 -08:00
Noah Gorny
8784ed2785
Merge pull request #1986 from ajeetdsouza/zoxide
...
plugin: add zoxide
2021-11-24 21:43:39 +02:00
Ajeet D'Souza
a89f2f8f13
plugin: add zoxide
2021-11-24 16:49:46 +05:30
Noah Gorny
447c89aa0e
Merge pull request #1981 from william-richard/make-default-branch-match-exactly-main
...
Look for branches that are literally the word main
2021-11-16 20:09:22 +02:00
William Richard
2a23598873
Make the regex looking for the main branch match the entire line
2021-11-15 12:19:05 -05:00
Noah Gorny
7b4056fdf9
Merge pull request #1984 from NoahGorny/docs-pin-docutils
...
docs: Pin docutils to 0.17.1
2021-11-13 20:25:33 +02:00
Noah Gorny
1ff2497c9e
docs: Pin docutils to 0.17.1
...
Seems like docutils 0.18 has some problems and it is breaking our docs
build
(https://issues.apache.org/jira/browse/FLINK-24662 )
Lets use 0.17.1 for now.
2021-11-12 19:14:22 +02:00
Noah Gorny
ab3b8b8f22
Merge pull request #1979 from gaelicWizard/preexec-histcontrol
...
preexec: work around upstream mangling of `$HISTCONTROL`
2021-11-01 23:25:02 +02:00
William Richard
daaab1b73d
Use \s instead of \b
...
\b matches things like - and _, which is often used in branch names
2021-10-25 11:55:26 -04:00
William Richard
98bd0ae149
Use `/b` to find the default branch, instead of start/end of line
2021-10-25 11:35:19 -04:00
Noah Gorny
c90a6283ef
Merge pull request #1976 from gaelicWizard/utilities
...
Use `_bash-it-egrep()`
2021-10-23 23:33:04 +03:00
William Richard
a14d9cb6ea
Look for branches that are literally the word main
...
I have a repo with many other branches that contain the string `main`,
but our default branch is still master. This grep was seeing those other branches
and deciding that my default branch was `main`. This tighter regex
fixes that behavior for me.
2021-10-22 11:19:21 -04:00
John D Pell
bdfb987f0c
plugin/xterm: don't rely on `$1`
...
_bash-preexec_ passes the "current" command line as `$1`, but this is unreliable and we explicitly discourage it's use.
Use `$BASH_COMMAND` instead.
2021-10-20 15:50:15 -04:00
John D Pell
9ce199c251
preexec: set options before load
...
By setting `__bp_delay_install`, we avoid any immediate initialization at all. We then override two troublesome functions before calling `__bp_install_after_session_init()`.
The `__bp_install_after_session_init()` function doesn't enable the DEBUG trap, just sets `$PROMPT_COMMAND` to include `__bp_install()`, so the actual final `$PROMPT_COMMAND` is not finished, and DEBUG trap set, until after the first prompt is displayed.
2021-10-20 15:28:59 -04:00
John D Pell
00f5f2a62e
Use `_bash-it-egrep()`
2021-10-18 22:08:56 -04:00
Noah Gorny
2d1bd82575
Merge pull request #1975 from krapshsa/krapshsa-patch-1
...
Fix save-and-reload-history command not found
2021-10-18 22:22:21 +03:00
Noah Gorny
5e3810ac96
Merge pull request #1973 from gaelicWizard/utilities
...
lib/utilities: minor improvements
2021-10-18 22:05:05 +03:00
Noah Gorny
5feebcc9d9
Merge pull request #1974 from zou000/patch-1
...
Fix home dir substitution
2021-10-18 21:59:59 +03:00
krapshsa
b0e8729b0f
Fix save-and-reload-history command not found
2021-10-19 00:58:01 +08:00
John D Pell
253d1213e0
lib/utilities: new function `_bash-it-egrep()`
...
The existing function `_bash-it-grep()` is weird. New function `_bash-it-egrep()` just does the thing without requiring two subshells and manual invocation.
2021-10-18 09:14:32 -04:00
John D Pell
b8ee63c67d
lib/utilities: quote SC2295
...
Doesn't show up on my shellcheck 0.7.2, but does for NoahGorny!
2021-10-18 09:14:32 -04:00
John D Pell
b986c39040
lib/utilities: XDG_CACHE_HOME
...
Use $XDG_CACHE_HOME environment constant instead of placing a tmp/cache folder inside the bash-it data repo. If not defined, fall back to current behavior.
This resolves Bash-It/Bash-It#1904 .
2021-10-18 09:14:32 -04:00
Noah Gorny
7987e4bfcd
Merge pull request #1883 from seefood/ira/autosave-history-plml
...
Add history flushes on each command to the powerline themes
2021-10-17 19:51:56 +03:00
zou000
7911f770cf
use `\w`
2021-10-16 22:29:25 -07:00
zou000
bb3a51f742
Update powerline.base.bash
2021-10-16 20:24:07 -07:00
zou000
413d7a1326
Fix home dir substitution
...
See the discussions in 953e422bed (commitcomment-58148656) . Tested with bash 5.1 and bash 3.2
2021-10-16 19:15:00 -07:00
John D Pell
7cd02781f8
lib/utilities: `_bash-it-component-help()`
...
No need to `rm` when we overwrite the file the line after next. Alsö, use `>|` in case the user sets `noclobber`; we do expressly intend to overwrite the file in this case.
2021-10-13 21:13:45 -07:00
John D Pell
f7cc442af4
lib/utilities: simplify `_bash-it-array-dedup()`
...
alsö fix usage example of `_bash-it-array-contains-element()`
2021-10-13 09:28:21 -07:00
Noah Gorny
48c17e95c3
Merge pull request #1968 from gaelicWizard/oops
...
theme/powerline: fix an oops in the last patch
2021-10-12 23:26:17 +03:00
John D Pell
953e422bed
theme/powerline: fix an oops in the last patch
...
The tilde should not have been escaped, and in fact I did not have it escaped in my main branch, but the PR I submitted did have it escaped and...now it shows up in the prompt line for all the PowerLine themes... oops.
2021-10-12 11:08:37 -07:00
Ira Abramov
d6239cf190
Merge branch 'master' of https://github.com/bash-it/bash-it into ira/autosave-history-plml
...
* 'master' of https://github.com/bash-it/bash-it : (114 commits)
ci: Bump go to 1.17 from 1.14
skip go tests when go is not available
plugins: Add ble.sh plugin
clean up pyenv plugin
Lint: prepare `lib/utilities` for `shellcheck` (#1933 )
plugin/base: improvements (#1930 )
plugins/percol: `bind`
completion/git: `shfmt` && `shellcheck`
completion/git: expand search range
plugin/percol: `shellcheck` & `shfmt`
plugins/percol: use `_command_exists`
completion/pip: simplify code flow
plugin/less-pretty-cat: remove `|| cat`
completion/wpscan: simplify code flow (whitespace)
plugins/less-pretty-cat: simplify code flow
plugins/less-pretty-cat: use `_command_exists`
lib/helpers: cite `_bash-it-find-in-ancestor()`
gradle: adopt `_bash_it_find_in_ancestor()`
lib/helpers: new function `_bash-it-find-in-ancestor()`
completion/laravel: simplify code flow
...
2021-10-11 08:32:15 +03:00
Noah Gorny
49698e269a
Merge pull request #1971 from NoahGorny/ci-update-go-version
...
ci: Bump go to 1.17 from 1.14
2021-10-10 23:58:08 +03:00
Noah Gorny
adab880f89
ci: Bump go to 1.17 from 1.14
2021-10-10 23:50:39 +03:00
Ira Abramov
c3d333ddc4
fix based on remarks on PR
2021-10-10 15:25:45 +03:00
Noah Gorny
cf08fcaff2
Merge pull request #1965 from gaelicWizard/completion-git
...
completion/git: improvements and linting
2021-10-07 00:10:47 +03:00
Noah Gorny
c3382c7b50
Merge pull request #1884 from NoahGorny/add-blesh-plugin
...
plugins: Add ble.sh plugin
2021-10-06 22:49:15 +03:00
cornfeedhobo
07384bcf7c
Merge pull request #1967 from cornfeedhobo/goenv-go-tests
...
skip go tests when go is not available
2021-09-30 07:34:05 -05:00
cornfeedhobo
b7feb14404
skip go tests when go is not available
2021-09-29 18:16:52 -05:00
Noah Gorny
cd38f32d95
test: Fix completion tests and add profile completion ones
2021-09-29 00:30:24 +03:00
Noah Gorny
4c4b138671
tests: Add more bash-it profile tests
2021-09-29 00:30:24 +03:00
Noah Gorny
7fc003b7d6
completion: Add completion for bash-it profile rm/list
2021-09-29 00:30:24 +03:00
Noah Gorny
e1017513d0
helpers: Disallow removing the default profile with bash-it profile rm
2021-09-29 00:30:24 +03:00
Noah Gorny
1ae407150c
helpers: Improve bash-it profile messages
2021-09-29 00:30:24 +03:00
Noah Gorny
337e188d25
helpers: Add bash-it profile rm
2021-09-29 00:30:24 +03:00
Noah Gorny
81b17f795b
helpers: Add bash-it profile list
2021-09-29 00:30:24 +03:00
Noah Gorny
6a923760d8
helpers: Add help message for bash-it profile
2021-09-29 00:30:24 +03:00
Noah Gorny
c710fc783a
gitignore: Ignore new profiles
2021-09-29 00:30:24 +03:00
Noah Gorny
b2ee5f96a5
test: helpers: Add profile command tests
2021-09-29 00:30:24 +03:00
Noah Gorny
d4ec41bef7
helpers: Add useful log in case of empty config
2021-09-29 00:30:24 +03:00
Noah Gorny
df560ca04a
docs: Add profile command docs
2021-09-29 00:30:24 +03:00
Noah Gorny
f78139fc05
install: Use new profile load command
2021-09-29 00:30:24 +03:00
Noah Gorny
2e3fe0a1ea
install: Load log file
2021-09-29 00:30:24 +03:00
Noah Gorny
cea95d72b3
lib: helpers: Rename _bash-it-process-component to _bash-it-determine-component-status-from-path
2021-09-29 00:30:23 +03:00
Noah Gorny
7f60b73a2a
helpers: Add new bash-it profile subcommand
2021-09-29 00:30:23 +03:00
Noah Gorny
956ca517f4
profiles: Add new default profile
2021-09-29 00:30:23 +03:00
Noah Gorny
eaa2f829bd
completion: Add bash-it profile subcommand
2021-09-29 00:30:23 +03:00
Noah Gorny
41cba9d7e4
helpers: Add enable-plugin and enable-alias aliases
2021-09-29 00:30:23 +03:00
Noah Gorny
ffeb770593
helpers: Print type when using disable all
2021-09-29 00:30:23 +03:00
Noah Gorny
6e03a726a6
helpers: Split some processing code out of _bash-it-describe
2021-09-29 00:30:23 +03:00
Noah Gorny
7fb7bb9cb8
Merge pull request #1952 from gaelicWizard/uncle
...
lib/helpers: new function `_bash-it-find-in-ancestor()`
2021-09-28 16:51:30 +03:00
Noah Gorny
008c2b30ac
Merge pull request #1885 from cornfeedhobo/pyenv-path
...
clean up pyenv plugin
2021-09-28 16:49:21 +03:00
Noah Gorny
c360f0c7c5
plugins: Add ble.sh plugin
2021-09-28 16:48:16 +03:00
cornfeedhobo
ec075a404a
clean up pyenv plugin
...
This commit cleans up the pyenv plugin to follow the newer conventions of the
other *env plugins, as well as addresses the changes made to pyenv for PATH
munging.
2021-09-28 07:44:40 -05:00
John D Pell
3eed0f033f
Lint: prepare `lib/utilities` for `shellcheck` ( #1933 )
...
* lib/utilities: shellcheck
SC2059
* lib/utilities: fix `_bash-it-get-component-type-from-path()`
Account for plugins with names that contain periods.
* lib/utilities: fix `_bash-it-array-dedup()`
Use fewer subprocesses and newline-delimited not space-delimited.
* lib/utilities: fix `_bash-it-component-list()`
Use fewer subprocesses and return newline-delimited, not space-delimited.
* lib/utilities: fix `_bash-it-component-list-matching()`
Use `sort -u` instead of `sort | uniq`
* lib/utilities: fix `_bash-it-component-list-enabled()`
Use fewer subprocesses, return newline-delimited instead of space-delimited, and use `sort -u` instead of `uniq | sort`
* lib/utilities: fix `_bash-it-component-list-disabled()`
Use fewer subprocesses, return newline-delimited instead of space-delimited, and use `sort -u` instead of `uniq | sort`
* lib/utilities: fix `_bash-it-grep()`
1. Executing `'/usr/bin/grep'` does *not* return the path to grep...
2. use `type -p` instead of external binary `which`.
3. Simplify parameter definition.
4. Why was there a space after `%s`?
* lib/utilities: use `_bash-it-grep`
Alsö, lose a spurious `cat`
* lib/utilities: lint `_bash-it-component-help`
* lib/utilities: lint `_bash-it-component-cache-file()`
* lib/utilities: `shfmt`
My apologies to future `git blame` hunters ♥
* lib/helpers: fix `_bash-it-get-component-name-from-path()`
Use `${BASH_IT_LOAD_PRIORITY_SEPARATOR}`
2021-09-28 15:24:18 +03:00
Noah Gorny
8a1dc96bc0
Merge pull request #1964 from gaelicWizard/completion-pip
...
completion/pip: simplify control flow
2021-09-28 15:14:58 +03:00
John D Pell
c2c76a380a
plugin/base: improvements ( #1930 )
...
* plugins/base: code style improvements
Quote variables, use $@ and $array[@] instead of $*, typeset some integers, remove unneccesasary binary invocation, use shell features when possible, remove `eval`, &c.
* plugins/base: conditional function definitions
Instead of functions failing when required tools aren't installed, just don't define the function.
Alsö, don't redefine del() if it already exists.
* plugins/base: rewrite `usage()`
Reimplement disk usage function using Bash syntax and simpler layout, without having to invoke an external binary.
* plugins/base: revamp `quiet()`
New implementation that is even quieter.
* plugins/base: `myip()`
* plugins/base: `pickfrom()`
* plugins/base: `passgen()`
Fix `passgen()` to not need `tr`, remove one subshell, and eliminate a useless `echo`.
* plugins/base: `mkcd()`
* plugins/base: `mkiso()`
* plugins/base: remove `banish-cookies()`
Adobe Flash is gone with the wind. Alsö, this would be something someone would do *once* and shouldn't be a function...
* plugins/base: `lsgrep` is SC2010
The `lsgrep()` function is *itself* explicitly forbidden by `shellcheck` rule SC2010.
Alsö, s/`$*`/`$@`
* plugins/base: `mkiso()`
Expressly handle unbound parameters.
* plugins/base: remove `command_exists`
* plugin/base: lint SC2154 && SC2144
Newly undisabled `shellcheck` rules
* plugin/base: import libs for tests
* plugin/base: `shfmt`
Apply `shfmt` using current project settings. My apologies to future `git blame` hunters. ♥
2021-09-28 15:13:27 +03:00
Noah Gorny
127cbbd4e3
Merge pull request #1957 from gaelicWizard/plugin-less-pretty-cat
...
plugin/less-pretty-cat improvements
2021-09-28 15:09:28 +03:00
Noah Gorny
05aac8ef39
Merge pull request #1956 from gaelicWizard/plugin-percol
...
plugin/percol `shellcheck`
2021-09-28 15:06:33 +03:00
Noah Gorny
002a23c758
Merge pull request #1961 from gaelicWizard/completion-wpscan
...
completion/wpscan: simplify code flow (whitespace)
2021-09-28 15:02:25 +03:00
Noah Gorny
37577550e1
Merge pull request #1963 from gaelicWizard/completion-laravel
...
completion/laravel: simplify code flow
2021-09-28 14:34:51 +03:00
Noah Gorny
198df8044a
Merge pull request #1955 from gaelicWizard/plugin-ruby
...
plugin/ruby `shellcheck`
2021-09-28 14:16:19 +03:00
John D Pell
a4e4f30ff1
plugins/percol: `bind`
...
Move `bind` below function definition
2021-09-26 11:54:32 -07:00
John D Pell
b0750fa49f
completion/git: `shfmt` && `shellcheck`
2021-09-24 21:11:28 -07:00
John D Pell
e22aac855e
completion/git: expand search range
...
- Remove limitation on OS.
- Add search for Mac OS X developer tools locations by using `xcrun` instead of trying to guess paths.
- Add search for locations based on path of `$GIT_EXE` (set by `lib/theme`).
2021-09-24 21:10:01 -07:00
John D Pell
92282c4795
plugin/percol: `shellcheck` & `shfmt`
...
According to `shellcheck`, the `_tac` alias simply doesn't work. At all. Ever. See SC2262 and SC2263.
2021-09-24 00:39:07 -07:00
John D Pell
2ada414266
plugins/percol: use `_command_exists`
...
Addresses bash-it/bash-it#1632
And use `_log_warning`.
Alsö, code style cleanup: quote things, handle unbound parameters, &c.
Alsö alsö, short-circuit if not installed or inadequate _Bash_ version.
2021-09-24 00:38:54 -07:00
John D Pell
b897c7d3ce
completion/pip: simplify code flow
...
Short-circuit the loader rather than indenting nearly the whole file.
ALSÖ, assign the `_pip_completion()` handler directly once it's loaded so that we get out of the way once we load it.
2021-09-23 22:21:02 -07:00
John D Pell
2ddb40751f
plugin/less-pretty-cat: remove `|| cat`
...
The logic to run `cat` if `pygmentize` fails seems useless, so just remove it.
2021-09-23 15:42:23 -07:00
John D Pell
84c96665ce
completion/wpscan: simplify code flow (whitespace)
...
Convert from indented if-block to return then unindented code. This should have basically one line change at the top, one line removed at the bottom, and then all whitespace.
2021-09-23 14:51:21 -07:00
John D Pell
5857648377
plugins/less-pretty-cat: simplify code flow
...
Convert from indented if-block to return then unindented code. This should have basically one line change at the top, one line removed at the bottom, and then all whitespace.
2021-09-23 10:17:28 -07:00
John D Pell
55be49e887
plugins/less-pretty-cat: use `_command_exists`
...
Addresses bash-it/bash-it#1632
Alsö, code style cleanup: quote variables, handle unbound parameters, &c.
2021-09-23 10:17:28 -07:00
John D Pell
e8966ea2a5
lib/helpers: cite `_bash-it-find-in-ancestor()`
...
Add `composure.sh` citation with examples and rewrite internal comments to describe the code flow.
2021-09-23 10:00:52 -07:00
Noah Gorny
d6c4c0cc88
Merge pull request #1960 from gaelicWizard/alias-vim
...
aliases/vim: simplify code flow
2021-09-23 13:50:57 +03:00
John D Pell
7ed12083f2
gradle: adopt `_bash_it_find_in_ancestor()`
2021-09-22 15:30:07 -07:00
John D Pell
0471a20c7c
lib/helpers: new function `_bash-it-find-in-ancestor()`
...
New function to do a search looking for a sibling to a parent of the current directory, for example to find `../../.git` to indicate that `$PWD` is inside a git repository.
2021-09-22 15:30:07 -07:00
John D Pell
be90e655f1
completion/laravel: simplify code flow
...
And apply `shfmt` and fix `shellcheck`
2021-09-22 13:48:10 -07:00
John D Pell
e5e7c7c55b
plugin/ruby: add missing parameter error message
2021-09-22 13:37:18 -07:00
John D Pell
8a81fd7271
plugins/ruby: prepare for `shellcheck`
2021-09-22 13:33:34 -07:00
John D Pell
6e2e945771
aliases/vim: simplify code flow
2021-09-22 13:21:16 -07:00
Noah Gorny
8c697715eb
Merge pull request #1938 from gaelicWizard/_command_exists
...
Use `_command_exists` everywhere
2021-09-20 14:56:45 +03:00
Noah Gorny
4700d7bf05
Merge pull request #1935 from gaelicWizard/next
...
Remove Executable Bit
2021-09-20 14:49:46 +03:00
Noah Gorny
4984d7adc8
Merge pull request #1834 from NoahGorny/lazily-load-pip
...
completion: pip: Only invoke pip when trying to complete it
2021-09-20 14:47:41 +03:00
John D Pell
fb6e05d915
completions/sqlmap: use `_command_exists`
...
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell
8a03f451b2
lib/helpers: simplify `_command_exists()` and `_binary_exists()`
...
Remove subshell and just use a regular `if`
2021-09-19 21:58:48 -07:00
John D Pell
a2e32f37c5
theme/dulcie: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
eabdf41b83
lib/theme: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
8e9438d715
completion/hub: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
699720fe8b
completion/docker-compose: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
679d8b10b6
completion/gradle: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
0ad1af8306
aliases/apt: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
88d66bbfca
aliases/curl: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
6618457f9e
aliases/general: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
699d893bef
completion/awscli: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
dca96e0c39
completion/consul: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
bb555aefbf
completion/pew: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
ef0c64322f
completion/travis: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
c98424308a
plugins/direnv: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
b038ea5869
plugins/nodenv: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
f0179c79ce
plugins/plenv: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
a31145335e
plugins/pyenv: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
cff6f3464a
plugins/rbenv: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
b14bb4735e
plugins/ruby: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
ccd8b52e89
plugins/virtualenv: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
c29eb16dfc
completion/git_flow: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
5eccc59d27
completion/git_flow_avh: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
757a5bf25b
aliases/vim: use `_command_exists`
2021-09-19 21:58:48 -07:00
John D Pell
cace3a591d
main: use `_command_exists`
...
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell
8e169388d2
completions/laravel: use `_command_exists`
...
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell
e2915df1e5
completions/wpscan: use `_command_exists`
...
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell
de58fdd73f
plugins/autojump: use `_command_exists`
...
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell
39d6488c6b
plugins/base: use `_command_exists`
...
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell
3e2ec1232d
plugins/hub: use `_command_exists`
...
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell
635e5488ba
plugins/jump: use `_command_exists`
...
Addresses bash-it/bash-it#1632
2021-09-19 21:58:47 -07:00
John D Pell
e701660ff1
plugins/node: use `_command_exists`
...
Addresses bash-it/bash-it#1632
alsö, quote variable, use `[[`, &c.
2021-09-19 21:54:21 -07:00
John D Pell
9378a8318f
plugins/nvm: use `_command_exists`
...
Addresses bash-it/bash-it#1632
alsö, quote variable, &c.
2021-09-19 21:54:00 -07:00
John D Pell
a7955b972c
plugins/powerline: use `_command_exists`
...
Addresses bash-it/bash-it#1632
2021-09-19 21:53:59 -07:00
John D Pell
f6c5717a7a
plugins/textmate: use `_command_exists`
...
Addresses bash-it/bash-it#1632
2021-09-19 21:52:46 -07:00
John D Pell
a375e7131e
Remove executable bit
2021-09-18 22:26:27 -07:00
Noah Gorny
77e9404c7d
Merge pull request #1927 from gaelicWizard/pwd
...
Use `$PWD` instead of `$(pwd)`
2021-09-19 08:18:54 +03:00
John D Pell
8d1e802565
test: Use `${PWD}` instead of `$(pwd)`
2021-09-18 13:15:13 -07:00
John D Pell
5fc418e479
Use `${PWD}` instead of `$(pwd)`
...
Don't subshell when there's a shell parameter for it.
2021-09-18 13:15:13 -07:00
John D Pell
1f6d6aa147
Use `$PWD` instead of `\`pwd\``
...
Don't subshell when there's a shell parameter for it.
2021-09-18 13:14:52 -07:00
Noah Gorny
0dbf1d593c
Merge pull request #1926 from gaelicWizard/basenamed
...
Use parameter substitution instead of `dirname`/`basename`, where safe to do so
2021-09-18 18:26:55 +03:00
John D Pell
1c3cbf7ca6
Delete `.shellcheckrc` ( #1947 )
...
* CI: disable Ubuntu 16.04 as it's EOL
https://github.blog/changelog/2021-04-29-github-actions-ubuntu-16-04-lts-virtual-environment-will-be-removed-on-september-20-2021/
* main: lint false positive
* install: lint
* plugins/cmd-returned-notify: don't `export`
* plugins/xterm: lint
* plugins/git: lint
* plugins/goenv: lint
* plugins/alias-completion: lint false positives
* plugins/alias-completion: fix SC2155, SC2154
Declare `locals` at the top of the function
* completion: lint completions using `bash_completion` functions
Match the style of the existing code
* completion/knife: lint false positives
* completion/knife: lint
* completion/sdkman: lint
* completion/composer: lint
* Move `.shellcheckrc` under `themes/`
* lib/theme: fix SC2155, SC2154, SC2034
* lib/colors: don't warn on unused variables
We assign a large number of variables here and they may or may not be used anywhere else, so disable SC2034 for this file (only).
Alsö disable SC2005 as the functions in this file were written before `printf` was invented and have to do some fancy metascripting to get escape sequences interpreted reliably. I’m not smart enough to fix this to use `printf`, so leave it for now.
* themes/agnoster: lint
* themes: disable SC2154 for colors
Each one of these themes will need it’s own fix for SC2154, possibly upstream.
Due to the way themes are, it's entirely normal to have a *lot* of false positives for SC2034. So much so, that I have to admit that it is probably just not worth linting for SC2034 despite my dislike of blanket ignore rules.
* themes: disable SC2154, fix SC2155
Each one of these themes will need it’s own fix for SC2154, possibly upstream.
Due to the way themes are, it's entirely normal to have a *lot* of false positives for SC2034. So much so, that I have to admit that it is probably just not worth linting for SC2034 despite my dislike of blanket ignore rules.
* Delete `.shellcheckrc`
* remove executable bit
2021-09-18 12:50:59 +03:00
Noah Gorny
b48f3fd7d3
Merge pull request #1909 from gaelicWizard/SVN
...
themes/base: don't invoke svn if possible
2021-09-18 12:39:48 +03:00
Noah Gorny
b72588edfd
Merge pull request #1949 from gaelicWizard/EditorTab
...
EditorConfig: set `indent_size = tab`
2021-09-18 12:38:42 +03:00
John D Pell
435151819f
EditorConfig: set `indent_size = tab`
...
Despite `indent_size` being set to `tab` by default, it turns out that we set `indent_size` to `2` for `*` at the top of this file. So, for everywhere else, explicitly set `indent_size` to the default (`tab`). This should achieve the goal of my last patch to `.editorconfig`.
2021-09-17 10:44:53 -07:00
John D Pell
470341b23a
Drop `basename` in favor of Bash strings
...
Convert `var=$(basename $file)` to `var="${file##*/}"`
2021-09-16 16:59:02 -07:00
John D Pell
dee55a03cc
drop `dirname` in favor of native Bash strings (1 of 2)
...
Convert `var=${dirname $filename)` to `var="${filename%/*}` in cases where there is no ambiguity.
Make sure that the path in `$BASH_IT` is absolute because this path gets embedded in the template `.bash_profile` file if selected by the user.
2021-09-16 16:59:02 -07:00
Noah Gorny
f9de8d170a
Merge pull request #1941 from gaelicWizard/themes_autosave
...
Themes: use `_save-and-reload-history()`
2021-09-16 21:22:21 +03:00
Noah Gorny
99eab7a76c
Merge pull request #1936 from NoahGorny/fix-shellcheck-warnings
...
plugins: Fix shellcheck warnings on already linted files
2021-09-12 08:13:44 +03:00
John D Pell
9d656747a9
themes: remove executable bit
2021-09-11 21:25:14 -07:00
John D Pell
ffe15ebfe0
themes: use `_save-and-reload-history()`
...
First pass to use _Bash It_'s automatic history management.
2021-09-11 21:25:14 -07:00
John D Pell
476fcb4325
lib/theme: new `_bash_it_appearance_scm_init()`
...
Wrap init code in a function and call the function immediately. Several plugins do this, and it allows us to more easily implement a hooks-based system in the future.
Alsö, avoid external binary `which`. Use built-in `type -P` instead. Uppercase `-P` forces a path search to avoid hashed matches and functions/aliases and whatnot.
2021-09-11 10:22:17 -07:00
Noah Gorny
f0690c09fb
Merge pull request #1939 from Bash-it/revert-1767-disable-macos-11
...
Reinstate macOS 11 job
2021-09-11 16:43:36 +03:00
John D Pell
9c1dbbcf12
lib/scmhelpers: reorder SCM detection waterfall
...
This reduces the need to invoke subprocesses
2021-09-11 00:02:27 -07:00
John D Pell
8c0860588d
themes/base: don't invoke svn if possible
...
If we are specifically in the situation #1612 , then check for a working `svn` command. If we're not in that situation, then don't waste time on it.
2021-09-11 00:02:27 -07:00
Noah Gorny
ec3b8d645f
Revert "ci: Remove macos-11.0 as it is unreliable"
2021-09-10 16:54:51 +03:00
Noah Gorny
c6f6d8c27a
plugins: Fix shellcheck warnings on already linted files
2021-09-09 20:57:03 +03:00
Noah Gorny
9ea60020ae
Merge pull request #1915 from gaelicWizard/bash_completion
...
Support multiple versions of _Bash Completion_
2021-09-07 10:12:12 +03:00
John D Pell
feacd560b6
completion/system: update wording on shell version
2021-09-05 15:43:05 -07:00
John D Pell
ecfcaba32e
completion/system: accomodate multiple versions
...
For Homebrew, switch between v1 and v2 of bash-completion based on whether the running Bash shell is new enough to use v2.
2021-09-05 15:43:05 -07:00
Noah Gorny
5782325dea
Merge pull request #1903 from gaelicWizard/unbound
...
Gracefully handle unbound parameters
2021-08-31 20:16:26 +03:00
John D Pell
85408743fa
lib/log: default to no logging at all
...
Set the default when BASH_IT_LOG_LEVEL is unbound to log level none: no warnings or errors are reported at all.
2021-08-26 14:11:41 -07:00
John D Pell
3654198deb
Tests for 'default' prefix
2021-08-26 14:11:41 -07:00
John D Pell
0c412442f5
completion/system: give up hope
...
Give up and accept defeat that bash-completion can't reasonably be audited for unbound parameters. Wrap invocation with disabling strictness, and restore after if it was enabled.
2021-08-26 14:11:41 -07:00
John D Pell
cd65e0925f
plugins/base: unbound BASH_IT_LEGACY_PASS
...
Expressly handle as blank when $BASH_IT_LEGACY_PASS is not set.
2021-08-26 14:11:41 -07:00
John D Pell
bd9f4015a7
lib/helpers: handle unset parameter
...
Expressly handle $BASH_IT_REMOTE as blank when variable is not set.
2021-08-26 14:11:41 -07:00
John D Pell
8fb75cf0e3
lib/helpers: handle unbound parameter
...
Expressly handle $BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE being not-set as being blank.
2021-08-26 14:11:41 -07:00
John D Pell
0eff44930c
lib/utilities: handle unbound parameter
...
Expressly handle unbound $BASH_IT_GREP when testing for value
2021-08-26 14:11:41 -07:00
John D Pell
233fcc3091
lib/log: handle undefined variable
...
Expressly deal with if $echo_yellow hasn’t been defined
2021-08-26 14:11:41 -07:00
John D Pell
f71fa5be2c
Handle unbound variables
...
Handle BASH_IT, BASH_IT_OLD_BASH_SETUP, BASH_IT_THEME, BASH_THEME, and PROMPT.
2021-08-26 14:11:41 -07:00
John D Pell
5001995e92
Deal with unabound BASH_IT_RELOAD_LEGACY
2021-08-26 14:11:41 -07:00
John D Pell
bcd67db4ab
lib/preview: handle unbound parameter
...
If $BASH_PREVIEW is unset, treat it as blank.
2021-08-26 14:11:41 -07:00
John D Pell
02c13b7921
lib/log: handle undefined variables
...
If the user hasn't defined BASH_IT_LOG_LEVEL, then the integer comparison fails. Handle it by defaulting to '1'.
If lib/log is loaded improperly, the BASH_IT_LOG_PREFIX may be undefined. Unlikely, but no harm in handling it too.
Likewise, if no theme is loaded, then $echo_green, $echo_normal, et al are not defined.
2021-08-26 14:11:41 -07:00
Noah Gorny
8b3867fe35
Merge pull request #1910 from gaelicWizard/brew
...
lib/helpers: new function to set BASH_IT_HOMEBREW_PREFIX
2021-08-26 22:17:57 +03:00
John D Pell
0f28824ad5
lib/helpers: invert test in _bash_it_homebrew_check()
...
Check if `brew` is installed every time, and *unset* `$BASH_IT_HOMEBREW_PREFIX` if not found. This accounts for the edge-case of a user _uninstalling_ Homebrew without restarting the shell.
2021-08-22 12:48:48 -07:00
John D Pell
65ef8e2e8b
Use _bash_it_homebrew_check() in plugins, completions
...
Use new function `_bash_it_homebrew_check()` in existing plugins and completions which look for Homebrew.
Alsö, use `$OSTYPE` instead of calling external `uname` binary.
2021-08-22 12:48:48 -07:00
John D Pell
9e255c2139
lib/helpers: new function to set BASH_IT_HOMEBREW_PREFIX
...
New function `_bash_it_homebrew_check()` sets global variable `$BASH_IT_HOMEBREW_PREFIX` using `brew --prefix` if `brew` exists as a valid command. If `brew` isn't installed, then return failure.
Plugins can test for `brew` by calling this function and, if it succeeds, they can rely on `$BASH_IT_HOMEBREW_PREFIX` being defined properly.
2021-08-22 12:48:48 -07:00
Noah Gorny
226454b069
Merge pull request #1921 from NoahGorny/fix-update-not-popping-back-cwd
...
fix update not popping back cwd
2021-08-18 21:17:11 +03:00
Noah Gorny
9566a3ec18
helpers: Improve pull_and_update_inner by restoring old pwd
...
Renamed the function to _bash-it_update_migrate_and_restart
Use pushd/popd instead of passing another parameter
Document the function so it will be clear that it does not return
2021-08-18 00:29:45 +03:00
Noah Gorny
caec973c18
helpers: Pop pwd correctly when not needing to update
2021-08-17 23:50:58 +03:00
Noah Gorny
9cc36de58e
Merge pull request #1918 from NoahGorny/fix-defaults-completion
...
defaults: Revert to old comparison
2021-08-17 23:36:19 +03:00
Noah Gorny
67eff71d72
defaults: Revert to old comparison
...
Also fix a small bug along the way :)
2021-08-15 21:28:00 +03:00
Noah Gorny
907fa1de96
Merge pull request #1916 from gaelicWizard/EditorConfig
...
Don't set `indent_size` when using tabs
2021-08-15 21:04:51 +03:00
John D Pell
6ee4cb4597
EditorConfig: don't specify indent size
...
When using tabs, `indent_size` should be set to `tab`, which is the default. Furthermore, `tab_width` (which is likely what was intended when `indent_size` was entered) should be left up to the user. If the user likes an 8-character indent, then let them. If they like 2-character indent size, then let them. Using tabs means that this all works normally for everyone, even if it's different on different screens.
2021-08-14 20:14:01 -07:00
John D Pell
de9ea54b81
Don't call external `uname` when `$OSTYPE` will do ( #1911 )
...
* lib/helpers: use `$OSTYPE` instead of `$(uname)`
* plugins/osx: use `$OSTYPE` instead of `$(uname)`
* plugins/boot2docker: use `$OSTYPE` instead of `$(uname)`
* plugins/python: use `$OSTYPE` instead of `$(uname)`
* plugins/base: use `$OSTYPE` instead of `$(uname)`
Alsö, use `[[` instead of `[` as the former has less insane argument handling being shell syntax rather than a builtin command that must emulate being a real binary
* completion/brew: use `$OSTYPE` instead of `$(uname)`
* completion/git: use `$OSTYPE` instead of `$(uname)`
Alsö, use `[[` instead of `[`.
* completion/fabric: use `$OSTYPE` instead of `uname`
* theme/demula: use `$OSTYPE` instead of `$(uname)`
* theme/rana: use `$OSTYPE` instead of `$(uname)`
2021-08-14 10:20:12 +03:00
Noah Gorny
e321a3d657
Merge pull request #1913 from Bash-it/ksuther/master
...
Fixed defaults autocompletion.
2021-08-12 00:35:13 +03:00
Kent Sutherland
a6d58351e7
Fixed defaults autocompletion.
...
Need to use grep WITHOUT case-sensitivity. Otherwise results such as com.apple.iChat and com.apple.imagent won't be handled correctly and neither one can be completed.
Fixed another comparison that prevented "defaults read com.apple.iChat <complete>" from correctly returning the available defaults keys in that file.
2021-08-12 00:15:18 +03:00
Noah Gorny
0fb9d0c090
Merge pull request #1908 from gaelicWizard/bash_completion
...
Import bash-completion slightly more carefully
2021-08-12 00:11:47 +03:00
John D Pell
893c8dbb96
completion/system: support $BASH_COMPLETION
...
Bash-completion supports pre-defining $BASH_COMPLETION as the path to the main script, so use that if it's defined.
Alsö, don't load homebrew's completion if we've successfully loaded one already.
2021-08-08 23:08:39 -04:00
John D Pell
43947e2cbc
completion/system: prefer direct invocation
...
Instead of using the profile.d version, just invoke the script. The profile.d script preemptively short-circuits if it thinks that bash-completions has already been loaded, which it does by using the $BASH_COMPLETION variable, which is expressly supported by upstream to specify the location of the script...so it will entirely be never loaded if this is set.
2021-08-08 23:08:39 -04:00
Noah Gorny
9ea290a5ed
Merge pull request #1852 from tbhaxor/feature/completion/dart
...
Added completion for dart cli
2021-08-03 23:58:16 +03:00
Noah Gorny
e89403d59b
Merge pull request #1881 from NoahGorny/lint-pure-theme
...
Refactor scm_prompt usage in many themes
2021-08-03 23:22:09 +03:00
Noah Gorny
61c0357414
completion: pip: Only invoke pip when trying to complete it
...
This should greatly reduce shell load time, as the pip invocation takes
a lot of time
2021-08-03 22:42:01 +03:00
cornfeedhobo
e13f7d1b07
Merge pull request #1901 from cornfeedhobo/libera-chat
...
move to Libera.Chat
2021-07-11 11:30:21 -05:00
cornfeedhobo
aad58bc910
move to Libera.Chat
2021-07-06 22:21:46 -05:00
Ron Green
d4ebba174c
feat(git): add git unpushed alias ( #1897 )
...
* feat(git): add git unpushed alias
2021-06-23 15:02:04 +03:00
Zhengnan Zhao
0f3e4dc8be
Have git check out main branch if present ( #1886 )
...
Create function to get default git branch, and use main branch if present
2021-06-23 13:26:48 +03:00
Gurkirat Singh
e51fe1fe2b
Abort upgrade if unsaved changes found in bashit directory ( #1890 )
...
helper (improvement): added safeguard for unsaved changes
2021-06-23 13:25:42 +03:00
Noah Gorny
d979c32c8a
Merge pull request #1891 from tbhaxor/bugfix/helper/upgrade
...
Replace reload with restart bash it after upgrade
2021-06-23 13:24:49 +03:00
Noah Gorny
f6e3fc358c
Merge pull request #1898 from tbhaxor/bugfix/lint/wpscan
...
FIxed wpscan completion linting
2021-06-23 13:22:25 +03:00
Noah Gorny
e70211549f
Merge pull request #1899 from georgettica/georgettica/bump-pre-commit-hooks
...
chore(pre-commit): bump version
2021-06-23 13:21:06 +03:00
Ron Green
a3f5b5f29a
chore(pre-commit): bump version
...
done in the beginning because of build issues, but was solved during the work on #1897
2021-06-17 10:37:19 +03:00
Gurkirat Singh
682fd32a13
lint (bugfix): wpscan completion linting fix
2021-06-17 08:51:02 +05:30
Gurkirat Singh
01b916c544
helpers (bugfix): restart bashit after upgrade
2021-06-11 12:41:28 +05:30
ofir shtrull
2444a57cc5
feat: add k8s namespace indicator ( #1887 )
...
* Add k8s namespace to prompt
2021-06-10 16:04:56 +03:00
Noah Gorny
9b62a5c4df
Merge pull request #1888 from clupasq/feature/powerline-command-duration
...
Add command duration to the powerline theme family
2021-06-10 16:04:28 +03:00
Cristian Lupascu
1e6113f7b7
Add command duration to the powerline theme family
...
Fix the __powerline_duration_prompt: location & unused variable `prompt`
Remove the duration segment from powerline* theme defaults
Different color for duration prompt segment
2021-06-05 13:47:54 +03:00
Ira Abramov
9f4c71d40f
Add history flushes on each command to the powerline themes.
2021-05-19 10:54:28 +03:00
Noah Gorny
dff892e0a3
themes: Adapt themes to new scm_prompt api
2021-05-16 19:17:02 +03:00
Noah Gorny
2ae0350f5d
themes: base: Add unified scm_prompt function
2021-05-16 19:17:02 +03:00
Noah Gorny
b65a7cc67c
themes: Lint pure theme
2021-05-16 13:59:18 +03:00
Noah Gorny
7f193a2e05
Add pure theme to clean_files.txt
2021-05-16 13:52:36 +03:00
Noah Gorny
8c47706139
Merge pull request #1877 from NoahGorny/fix-alias-completion-for-real
...
plugins: Fix alias-completion by comparing completions to alias literally
2021-05-15 18:58:15 +03:00
Noah Gorny
2120be9372
plugins: Fix alias-completion by using helper util
...
By using _bash-it-array-contains-element, we can safetly iterate over
elements in the $completions array
2021-05-15 11:42:10 +03:00
Noah Gorny
476c568566
Merge pull request #1874 from oliverralbertini/add-hg-bookmarks-support
...
[base.theme] add support for hg's bookmarks feature
2021-05-08 00:13:20 +03:00
Oliver Ruben Albertini
26118d1835
[base.theme] add support for hg's bookmarks feature
...
Will conditionally show the branch based on the current bookmark instead
of branch.
2021-04-27 11:36:14 -07:00
Noah Gorny
d3bb347786
Merge pull request #1837 from NoahGorny/vendor-jboss-completion
...
vendor jboss completion
2021-04-27 01:32:34 +03:00
Noah Gorny
b8da4cb68c
Merge pull request #1875 from NoahGorny/fix-alias-completion
...
plugins: alias-completion: Revert back to read without -r
2021-04-23 17:05:17 +03:00
Noah Gorny
940739a8a0
Merge pull request #1873 from NoahGorny/improve-clean-files-txt
...
Add clean_files.txt sorting hook
2021-04-23 00:19:05 +03:00
Noah Gorny
716b49fa0e
lint: Sort clean_files.txt according to check-clean-files-txt.sh
2021-04-22 20:53:30 +03:00
Noah Gorny
e15b53ea61
hooks: Use compat31 in check-clean-files-txt.sh
2021-04-22 20:53:30 +03:00
Noah Gorny
1b7448bc9d
plugins: alias-completion: Revert back to read without -r
2021-04-22 20:38:30 +03:00
Noah Gorny
d0aa9cb542
hooks: Add check-clean-files-txt.sh
2021-04-22 01:48:20 +03:00
Noah Gorny
c731e45770
lint: Make clean_files.txt more tidy
2021-04-22 01:48:13 +03:00
John Fred Fadrigalan
7b8dbd39bc
Clean alias completion plugin ( #1872 )
...
* Sort plugins/available
* Clean alias-completion plugin
* Fix shellcheck warning. SC1090
* Change shellcheck source to /dev/null for explicity
* Disable shellcheck warning SC2162
2021-04-22 01:46:50 +03:00
Noah Gorny
31bea24da6
Merge pull request #1859 from tbhaxor/feature/completion/dmidecode
...
Feature/completion/dmidecode
2021-04-22 01:41:56 +03:00
Noah Gorny
7cd94e1f7f
Merge pull request #1870 from cevhyruz/clean-candy-theme
...
Clean candy theme
2021-04-19 21:49:23 +03:00
John Fred Fadrigalan
370c5b349e
Sort theme section
2021-04-20 01:48:37 +08:00
John Fred Fadrigalan
c0fa514f7d
Place 'theme/clean' alphabetically on clean_files.txt
2021-04-20 01:40:52 +08:00
John Fred Fadrigalan
409e18f7cb
Clean candy theme
2021-04-20 01:18:40 +08:00
Noah Gorny
5e723842b8
Merge pull request #1869 from NoahGorny/add-restart-docs
...
docs: Add a section about bash-it restart
2021-04-14 19:28:12 +03:00
Noah Gorny
7e620fed63
docs: Add a section about bash-it restart
2021-04-14 16:55:23 +03:00
Noah Gorny
58f2240789
Merge pull request #1845 from NoahGorny/docs-add-logo
...
docs: Add logo of bash-it to readme
2021-04-08 21:48:31 +03:00
Noah Gorny
2201f6658b
Add 2021 to license
2021-04-06 20:59:08 +03:00
Noah Gorny
c7f125a85d
docs: Improve readme readability
2021-04-06 20:58:26 +03:00
Noah Gorny
80f143c90b
docs: Add nice badges to readme
2021-04-06 20:56:31 +03:00
Noah Gorny
5d809dd73d
docs: Add logo of bash-it to readme
2021-04-06 20:56:31 +03:00
Noah Gorny
ebe59c9adc
Merge pull request #1850 from tbhaxor/feature/completion/ngrok
...
Added completion for ngrok tool
2021-04-04 22:36:13 +03:00
Noah Gorny
a6e2c2fc13
Merge pull request #1863 from artemkovalyov/patch-2
...
add --no-start to docker-compose up command
2021-04-04 22:35:19 +03:00
Noah Gorny
6678788f19
Merge pull request #1857 from bingzhangdai/bindai/extract-plugin
...
Update extract.plugin.bash, extract compressed file to target directory
2021-04-04 22:34:48 +03:00
Noah Gorny
4f0fa7ebe7
Merge pull request #1862 from NoahGorny/fix-install-error
...
install: Dont quote number vars, to support older bash versions
2021-04-04 22:34:25 +03:00
Artem Kovalov
905abd37f8
add --no-start to up command
2021-04-03 13:15:04 +02:00
Noah Gorny
a8b43620f8
install: Dont quote number vars, to support older bash versions
2021-04-01 17:59:59 +03:00
Noah Gorny
0239ab8c31
completion: ngrok: Add --help option
2021-04-01 00:37:49 +03:00
Noah Gorny
1dfaf36d91
completion: ngrok: Only complete the list in case prev is ngrok
2021-04-01 00:37:49 +03:00
Noah Gorny
e06066c367
Merge pull request #1842 from Titivoot/master
...
easy theme added
2021-04-01 00:35:15 +03:00
Gurkirat Singh
035fc920ad
completion (improvement): remove if statement
2021-04-01 00:34:37 +03:00
Gurkirat Singh
ab011cd9ba
completion (improvement): fixed linting
2021-04-01 00:34:37 +03:00
Gurkirat Singh
d42a1206f9
completion (feature): implemented ngrok
2021-04-01 00:34:37 +03:00
Noah Gorny
ce854255b4
Merge pull request #1833 from NoahGorny/add-license-to-docs
...
add license to docs
2021-04-01 00:29:07 +03:00
Noah Gorny
9524bf85ae
docs: Add easy theme to themes image list
2021-04-01 00:28:28 +03:00
Titivoot Pangrit
6866648ac6
Add theme Easy
2021-04-01 00:28:28 +03:00
Noah Gorny
514a753901
Merge pull request #1858 from lintonf/patch-1
...
Fix spelling mistake with terraform destroy alias
2021-03-31 23:56:58 +03:00
Gurkirat Singh
e481eb41e5
completion (improvement): dmidecode lint fixed
2021-03-30 11:03:18 +05:30
Gurkirat Singh
a3ae37b385
completion (feature): dmidecode
2021-03-30 11:01:19 +05:30
Linton Fisher
0b808b17f1
Fix spelling mistake
2021-03-30 00:57:13 +01:00
Gurkirat Singh
ed97b9d51f
dart completion (improvement): requested by @NoahGorny
2021-03-26 01:55:37 +05:30
Gurkirat Singh
19db142aae
completion (feature): dart cli
2021-03-26 01:43:53 +05:30
Noah Gorny
4860fb8c60
Merge pull request #1849 from tiagobarros99/purity-add-virtualenv
...
purity theme, added virtualenv name display
2021-03-25 19:16:35 +02:00
tiago
cda81f3d74
cleaned and linted purity theme
2021-03-24 21:39:57 +00:00
Bingzhang Dai
7331cd2676
Update extract.plugin.bash
2021-03-24 18:42:44 +08:00
Bingzhang Dai
399b5199b0
Update extract.plugin.bash, support to extract zip to target directory
2021-03-24 17:04:21 +08:00
tiago
64c4c30706
minor change
2021-03-17 15:39:57 +00:00
tiago
ea444459cf
improved PS1, function rename
2021-03-17 15:26:39 +00:00
tiago
682d6d728d
added python's virtualenv name
2021-03-10 15:24:32 +00:00
Noah Gorny
64d827c3da
completion: Use vendored jboss completion
...
Also include new jboss5 vendored completion
2021-02-13 10:41:16 +02:00
Noah Gorny
a30a76906c
Add "jboss-completion" from " https://github.com/rparree/jboss-bash-completion@master "
...
git-vendor-name: jboss-completion
git-vendor-dir: vendor/github.com/rparree/jboss-bash-completion
git-vendor-repository: https://github.com/rparree/jboss-bash-completion
git-vendor-ref: master
2021-02-13 10:34:49 +02:00
Noah Gorny
e89948a7f0
Squashed 'vendor/github.com/rparree/jboss-bash-completion/' content from commit fc87d94
...
git-subtree-dir: vendor/github.com/rparree/jboss-bash-completion
git-subtree-split: fc87d94e7da9431133190f60f5a84367e44d650c
2021-02-13 10:34:49 +02:00
Noah Gorny
e25e371ba7
docs: Add newline in readme and index.rst
2021-02-06 23:17:18 +02:00
Noah Gorny
e4e0c151b2
docs: Add license notice to readme
2021-02-06 23:16:58 +02:00