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
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
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
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
Noah Gorny
eced6802d0
Merge pull request #1856 from NoahGorny/fix-typeset-command-not-found
...
helpers: Fix broken compoure references after vendor change
2021-03-22 21:40:29 +02:00
Noah Gorny
02f6654841
test: Add bash-it help plugins test
2021-03-21 22:07:24 +02:00
Noah Gorny
7b5f758eba
helpers: Fix broken compoure references after vendor change
2021-03-21 21:52:47 +02: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
Noah Gorny
6f02b8d194
Merge pull request #1851 from ofirshtrull/master
...
Add support for active gcloud account in powerline prompt
2021-03-15 23:01:43 +02:00
Noah Gorny
c8ef6c9146
Merge pull request #1848 from matthewadams/master
...
add npm alias nt="npm test"
2021-03-13 18:55:02 +02:00
Ofir Shtrull
8ae2b1e73d
fix typo
2021-03-11 18:32:10 +02:00
Ofir Shtrull
ffc1701c0a
Add to prompt google gcloud active account
2021-03-11 18:25:23 +02:00
tiago
682d6d728d
added python's virtualenv name
2021-03-10 15:24:32 +00:00
Matthew Adams
96586dd575
add alias nt="npm test"
2021-03-09 14:14:19 -06:00
Noah Gorny
c59886b8ab
Merge pull request #1847 from tbhaxor/patch-2
...
Added alias for git rebase
2021-03-09 00:15:58 +02:00
Gurkirat Singh
5c6306deb7
alias (improvement): continue rebase after conflict resolve
2021-03-09 02:24:12 +05:30
Noah Gorny
6093ecbb60
Merge pull request #1841 from ddaza/master
...
fix: Git alias quote style broke functionality
2021-02-26 10:17:01 +02:00
ddaza
e289549a50
fix alias quotes
2021-02-25 19:45:59 -06:00
Artem Kovalov
9d7738d14d
Improved systemd aliases
...
Refactor naming
Add restart
2021-02-25 00:01:38 +02:00
Noah Gorny
7827907154
Merge pull request #1838 from bialad/patch-1
...
Remove deprecated kubectl run --generator
2021-02-24 19:06:55 +02:00
Tobias Månsson
0ed6f045f6
Remove deprecated kubectl run --generator
...
It now defaults to pod, so the --generator option is not required.
2021-02-15 07:41:39 +01: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
4607ee7452
Merge pull request #1836 from buhl/django-complete
...
vendoring django completion
2021-02-13 10:30:31 +02:00
Noah Gorny
0eab2962d3
Merge pull request #1835 from buhl/vendor-apm-completion
...
Vendor apm completion
2021-02-12 15:50:42 +02:00
buhl
0e77a94140
Vendored django completion
2021-02-09 11:01:37 +01:00
buhl
a0ba2a1787
Add "django-completion" from " https://github.com/django/django@3.1.6 "
...
git-vendor-name: django-completion
git-vendor-dir: vendor/github.com/django/django
git-vendor-repository: https://github.com/django/django
git-vendor-ref: 3.1.6
2021-02-09 10:56:10 +01:00
buhl
0dd01da4b7
Squashed 'vendor/github.com/django/django/' content from commit 32bb1421
...
git-subtree-dir: vendor/github.com/django/django
git-subtree-split: 32bb1421ae4bf8e3b730be0cb47ee026a72961f7
2021-02-09 10:45:13 +01:00
buhl
7fb7e27921
Added vendored apm completion
2021-02-08 16:05:45 +01:00
buhl
751d3e2496
Add "apm-completion" from " https://github.com/vigo/apm-bash-completion@master "
...
git-vendor-name: apm-completion
git-vendor-dir: vendor/github.com/vigo/apm-bash-completion
git-vendor-repository: https://github.com/vigo/apm-bash-completion
git-vendor-ref: master
2021-02-08 16:05:40 +01:00
buhl
e8342c1d97
Squashed 'vendor/github.com/vigo/apm-bash-completion/' content from commit d44593c
...
git-subtree-dir: vendor/github.com/vigo/apm-bash-completion
git-subtree-split: d44593c3f0514e1fcc668e47f875f83ceb054b36
2021-02-08 16:05:40 +01:00
Noah Gorny
2d56cc4167
Merge pull request #1788 from tbhaxor/lint/notify-send-completion
...
Lint/notify send completion
2021-02-08 10:24:24 +02:00
Noah Gorny
25c1c8978e
Merge pull request #1807 from NoahGorny/cleanup/composer-completions
...
formatted composer completion and used helper function
2021-02-06 23:32:58 +02:00
cornfeedhobo
133e48229a
Merge pull request #1832 from cornfeedhobo/gocomplete
...
ensure go completion works well with goenv
2021-02-06 15:27:12 -06: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
Noah Gorny
db318cdd3e
Merge pull request #1830 from NoahGorny/simplify-install
...
simplify install
2021-02-06 22:57:17 +02:00
cornfeedhobo
6870abc4fc
ensure go completion works well with goenv
2021-02-06 14:34:24 -06:00
Noah Gorny
e4f6006797
completion: composer: Rename _composer->__composer_completion
2021-02-06 20:37:28 +02:00
Noah Gorny
5c192575ce
install: Add bash-it prefix to all functions
2021-02-06 20:36:04 +02:00
Noah Gorny
3e7adde638
install: Move to double brackets in check_for-backup check
2021-02-06 20:25:56 +02:00
Noah Gorny
fe9ef1e4bd
Merge pull request #1816 from tbhaxor/lint/git-plugins
...
Lint/git plugins
2021-02-06 00:31:41 +02:00
Noah Gorny
75058ebf22
plugins: git: Fix git_stats
...
Also remove uneeded newline
2021-02-06 00:26:15 +02:00
Gurkirat Singh
5cb52fa239
fixed linting for plugins/available/git.plugin.bash file
2021-02-06 00:26:15 +02:00
Gurkirat Singh
77654875e5
fixed git-changelog plugin
2021-02-06 00:26:12 +02:00
Gurkirat Singh
63f9f660a9
credit given to original author
2021-02-06 00:25:33 +02:00
Gurkirat Singh
92d814b2f6
added plugin to create git changelog and formatted code
2021-02-06 00:25:33 +02:00
Noah Gorny
0d963b224f
completion: composer: Remove uneeded local "scripts" var
2021-02-06 00:23:31 +02:00
Noah Gorny
e9f28ff745
completion: composer: Add shellcheck directives
2021-02-06 00:23:31 +02:00
Gurkirat Singh
dbfcb431a8
formatted composer completion and used helper function
2021-02-06 00:23:31 +02:00
Gurkirat Singh
1d2a2fcd9a
added completion for notify-send command
2021-02-06 00:23:14 +02:00
Noah Gorny
af17501318
install: Add --overwrite-backup flag
...
This will ensure users will specify whether they want to overwrite the
backup or not, and check it even when we do silent installation
This does change the default behaviour and exits if the -f flag is not
specified and a backup is present.
2021-02-06 00:15:20 +02:00
Noah Gorny
9e37f0d09e
install: Move backup check into a separate function
2021-02-06 00:15:20 +02:00
Noah Gorny
ef10bcd151
install: Move modify config check into separate function
...
This helps us make the logic easier to read, and remove unneeded
confusion.
2021-02-06 00:15:20 +02:00
Noah Gorny
1fbd91ebf9
Merge pull request #1824 from cornfeedhobo/goenv-go
...
Ensure goenv and go play together well
2021-02-06 00:14:07 +02:00
Noah Gorny
71116f785f
Merge pull request #1828 from cornfeedhobo/composure-bump
...
Composure bump
2021-02-05 10:51:28 +02:00
cornfeedhobo
84049a4542
Update "composure" from " https://github.com/erichs/composure@55fdb9fa3cd0f181208a46d90da4d87d5b7e4351 "
...
git-vendor-name: composure
git-vendor-dir: vendor/github.com/erichs/composure
git-vendor-repository: https://github.com/erichs/composure
git-vendor-ref: 55fdb9fa3cd0f181208a46d90da4d87d5b7e4351
2021-02-05 00:15:02 -06:00
cornfeedhobo
aebe193136
Squashed 'vendor/github.com/erichs/composure/' changes from 5c3698d..55fdb9f
...
55fdb9f Merge pull request #24 from bvberkum/pr-21
b360ca5 Use command name, not last argument as shell-name [#23 ]
5c458c9 22 - Document revise behavior with GUI editors
7de4304 Update LICENSE copyright
f784e3a Merge pull request #20 from akatrevorjay/pr/zsh-plugin
1901dbe Merge pull request #19 from DrVanScott/master
6bcbc7b Add zsh-style plugin for easy load
37bccee fix _typeset_functions_about for functions starting with a dash
27623a9 fix zsh specific issues
2efc446 glossary: list only functions containing 'about'
7899d11 glossary: call _typeset_functions only once
072856e shell(): Fix for cygwin environment
2dc31de avoid error message if gprintf does not exist
git-subtree-dir: vendor/github.com/erichs/composure
git-subtree-split: 55fdb9fa3cd0f181208a46d90da4d87d5b7e4351
2021-02-05 00:15:02 -06:00
cornfeedhobo
e690f21e4e
Ensure goenv and go play together well
...
This PR seeks to address several issues surrounding the go and goenv plugins.
The nature of goenv allows for a situation where the initial shell does not
point to a working go binary, and instead at the included shim script. The
result is that one must run reload after moving to a project directory with a
version file, however in doing so, PATH is updated, requiring they exit the
shell or risk lookup collisions and unexpected behavior.
This is solved by using preexec to check the version before changing
directories and restarting the shell if the version has changed. The exec
pattern is copied from _bash-it-restart, but is edited to support this specific
use case.
Additionally, tests have been uploaded and these are now being linted.
2021-02-04 23:51:17 -06:00
cornfeedhobo
ff2f961ad7
Merge pull request #1822 from cornfeedhobo/stop-changing-working-directory
...
use absolute paths instead of changing directory
2021-02-03 09:05:59 -06:00
Noah Gorny
ce6487f63e
Merge pull request #1820 from buhl/composure
...
Vendoring the composure
2021-02-03 09:06:35 +02:00
buhl
49d7d2e8c4
Getting Bash-it to use the vendored composure
...
Fixed tests
Fixed install.sh and bash_it.sh
Added gitattributes to the vendor folder
Changed documentation
2021-02-02 16:34:04 +01:00
cornfeedhobo
8fcf713541
use absolute paths instead of changing directory
2021-01-31 15:32:23 -06:00
buhl
90dd69c8ad
Squashed 'vendor/github.com/erichs/composure/' content from commit 5c3698d
...
git-subtree-dir: vendor/github.com/erichs/composure
git-subtree-split: 5c3698df33cf92f9dbe75b807b1d29729989baaa
2021-01-31 14:56:34 +01:00
buhl
a0b6c4993a
Add "composure" from " https://github.com/erichs/composure@1.3.1 "
...
git-vendor-name: composure
git-vendor-dir: vendor/github.com/erichs/composure
git-vendor-repository: https://github.com/erichs/composure
git-vendor-ref: 1.3.1
2021-01-31 14:56:34 +01:00
Noah Gorny
293d86771a
Merge pull request #1779 from NoahGorny/deprecate-docker-machine
...
docker-machine: Deprecate both plugin and completion file
2021-01-29 16:48:07 +02:00
Noah Gorny
e8dc0f7434
deprecation: Replace errors with warnings
...
Deprecated component is not an error, but instead should be a warning to
the user
2021-01-29 16:06:53 +02:00
Noah Gorny
2500fe7dda
docker-machine: Deprecate both plugin and completion file
2021-01-29 16:06:51 +02:00
Noah Gorny
1ce93fd60e
Merge pull request #1795 from NoahGorny/cleanup/lerna-completions
...
formatted lerna completion and used helper function
2021-01-29 01:27:16 +02:00
Noah Gorny
b6d95c71ce
completion: lerna: Add shellcheck ignore directive
2021-01-28 20:53:34 +02:00
Gurkirat Singh
69e5a28ed3
formatted lerna completion and used helper function
2021-01-28 20:53:34 +02:00
Noah Gorny
28b2a2ba2b
Merge pull request #1797 from NoahGorny/cleanup/npm-completions
...
formatted npm completion and used helper function
2021-01-28 19:34:45 +02:00
Gurkirat Singh
3d3322d0c9
formatted npm completion and used helper function
2021-01-28 19:23:56 +02:00
Noah Gorny
6fb9379f92
Merge pull request #1796 from NoahGorny/cleanup/minikube-completions
...
formatted minikube completion and used helper function
2021-01-28 19:22:23 +02:00
Gurkirat Singh
645054a8c4
formatted minikube completion and used helper function
2021-01-28 19:18:36 +02:00
Noah Gorny
868d64ebb8
Merge pull request #1793 from NoahGorny/cleanup/kubectl-completions
...
formatted kubectl completion and used helper function
2021-01-28 19:16:51 +02:00
Gurkirat Singh
202531321d
formatted kubectl completion and used helper function
2021-01-28 18:57:00 +02:00
Noah Gorny
253e87e4a2
Merge pull request #1792 from NoahGorny/cleanup/kontena-completion
...
formatted kontena completion and used helper function
2021-01-28 18:55:14 +02:00
Gurkirat Singh
d4bf4e6a89
formatted kontena completion and used helper function
2021-01-28 18:32:51 +02:00
Noah Gorny
0748b3085e
Merge pull request #1799 from NoahGorny/cleanup/jungle-completions
...
formatted jungle completion and used helper function
2021-01-28 18:16:24 +02:00
Gurkirat Singh
714bf84528
formatted jungle completion and used helper function
2021-01-28 18:10:25 +02:00
Noah Gorny
391ce6e91f
Merge pull request #1802 from NoahGorny/cleanup/gem-completions
...
formatted gem completion
2021-01-28 18:07:51 +02:00
Noah Gorny
42695c22d0
completion: gem: Fix completion file
2021-01-28 17:55:51 +02:00
Gurkirat Singh
a8695edc8f
formatted gem completion
2021-01-28 17:55:50 +02:00
Noah Gorny
71c0c06a78
Merge pull request #1798 from NoahGorny/cleanup/pip-completions
...
cleanup/pip completions
2021-01-28 17:54:59 +02:00
Noah Gorny
5df1e653d9
completion: pip: Lint all pip files and clarify comment
2021-01-28 17:46:22 +02:00
Gurkirat Singh
7959acddd9
formatted pip pip3 and pipenv completion and used helper functions
2021-01-28 17:45:06 +02:00
Noah Gorny
c2d971f20e
Merge pull request #1801 from NoahGorny/cleanup/gh-completions
...
cleanup/gh completions
2021-01-28 17:44:21 +02:00
Noah Gorny
adc77bb622
completion: Lint github-cli completion and use completion_exists
2021-01-28 17:40:35 +02:00
Noah Gorny
2b66100c47
helpers: Add _completion_exists helper
2021-01-28 17:40:20 +02:00
Gurkirat Singh
759cdd5a6d
formatted github-cli completion
2021-01-28 17:40:20 +02:00
Noah Gorny
8969f018a4
Merge pull request #1800 from NoahGorny/cleanup/helm-completions
...
formatted helm completion and used helper function
2021-01-28 17:36:23 +02:00
Gurkirat Singh
9915f85e8b
formatted helm completion and used helper function
2021-01-28 17:30:26 +02:00
Noah Gorny
94a9c639c7
Merge pull request #1803 from NoahGorny/cleanup/gcloud-completions
...
cleanup/gcloud completions
2021-01-28 17:28:12 +02:00
Noah Gorny
067149725d
completion: Add about-completion to gcloud
2021-01-28 17:18:52 +02:00
Gurkirat Singh
ba5700e555
formatted gcloud completion and used helper function
2021-01-28 17:18:51 +02:00
Noah Gorny
8dfc4cee20
Merge pull request #1804 from NoahGorny/cleanup/docker-completions
...
completion: Lint docker completion and add about-completion
2021-01-28 17:17:55 +02:00
Noah Gorny
2e3cf0b3c0
completion: Lint docker completion and add about-completion
2021-01-28 17:03:25 +02:00
Noah Gorny
5b51842b54
Merge pull request #1805 from NoahGorny/bugfix/consul-completions
...
formatted consul completion and used helper function
2021-01-28 16:56:10 +02:00
Gurkirat Singh
846a576978
formatted consul completion and used helper function
2021-01-28 16:35:55 +02:00
Noah Gorny
284819e718
Merge pull request #1806 from NoahGorny/cleanup/conda-completions
...
formatted conda completion and used helper function
2021-01-28 16:34:51 +02:00
Gurkirat Singh
f9bc244718
formatted conda completion and used helper function
2021-01-28 16:27:34 +02:00
Noah Gorny
2c429e5bb1
Merge pull request #1809 from NoahGorny/cleanup/awless-completions
...
formatted awless completion and used helper function
2021-01-28 16:24:33 +02:00
Gurkirat Singh
b93ac7785c
formatted awless completion and used helper function
2021-01-28 16:19:48 +02:00
Noah Gorny
ef110e167c
Merge pull request #1808 from NoahGorny/cleanup/brew-completions
...
formatted brew completion
2021-01-28 16:19:09 +02:00
Noah Gorny
37a7fac128
completion: brew: Add shellcheck ignore directives
2021-01-28 16:09:02 +02:00
Gurkirat Singh
1d569573da
formatted brew completion
2021-01-28 16:09:00 +02:00
Noah Gorny
0d0fde9904
Merge pull request #1813 from NoahGorny/improve-test-helper
...
test: helper: cite plumbing metadata
2021-01-28 16:08:03 +02:00
Noah Gorny
25b3c96f43
Merge pull request #1817 from tiagobarros99/cleanup/modern-theme
...
Cleanup for modern theme
2021-01-28 12:25:07 +02:00
tiago
cb5047734b
retval check
2021-01-27 22:55:44 +00:00
tiago
3a846a2d47
cleanup modern theme
2021-01-27 22:55:44 +00:00
Noah Gorny
2388c74d84
Merge pull request #1776 from buhl/vendor
...
Add git vendor and vendor pre-exec lib
2021-01-27 23:25:30 +02:00
Noah Gorny
c79d6cd609
vendor: Add init.d directory to clean_files.txt
...
Also fix and lint the directory.
This is our code, and as such, should be linted.
2021-01-27 23:21:14 +02:00
Noah Gorny
9b04e11bfc
Merge branch 'master' into vendor
2021-01-27 16:43:34 +02:00
Noah Gorny
4f8fd5957f
Merge pull request #1780 from tbhaxor/lint/vue-completions
...
Lint/vue completions
2021-01-26 20:03:34 +02:00
Noah Gorny
7b817f388d
Merge pull request #1790 from BarbUk/clean/theme_starting_by_b
...
Clean b* themes
2021-01-26 19:57:45 +02:00
Noah Gorny
2db806fe0d
Merge pull request #1812 from tiagobarros99/fix-modern-theme
...
modern theme, added virtualenv name display, changed first bracket and second bracket
2021-01-26 19:56:44 +02:00
tiago
e80e29be6d
Merge remote-tracking branch 'upstream/master' into fix-modern-theme
2021-01-24 14:09:48 +00:00
Noah Gorny
70f0111f69
completion: vue: Remove uneeded condition
...
Also move the shellcheck warnings to be on their respective line
2021-01-23 23:14:24 +02:00
Gurkirat Singh
812efaab90
added vuejs completion in clean_files
2021-01-23 23:14:24 +02:00
Noah Gorny
49cf84c4fe
test: helper: cite plumbing metadata
2021-01-23 23:04:29 +02:00
Noah Gorny
6b3788051f
test: plugin: xterm: Use correct _command_exists invocation
2021-01-23 23:03:41 +02:00
Noah Gorny
046e528cc2
plugins: xterm: Fix shfmt complaints
2021-01-23 22:47:15 +02:00
buhl
29855ed1e6
Adding preexec as a vendored library
...
Added a vendored lib loading routine in bash-it.sh
Added documentation on how to vendor libs in bash-it
Added and fixed plugins using preexec
Added tests for two plugins
Removed the old preexec lib
2021-01-23 18:31:18 +01:00
tiago
e2be8bc2bc
trailing and code style
2021-01-23 17:30:20 +00:00
buhl
5ad497924c
Add "preexec" from " https://github.com/rcaloras/bash-preexec@0.4.1 "
...
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: 0.4.1
2021-01-23 18:28:43 +01:00
buhl
c9a7837b44
Squashed 'vendor/github.com/rcaloras/bash-preexec/' content from commit 7884535
...
git-subtree-dir: vendor/github.com/rcaloras/bash-preexec
git-subtree-split: 7884535ed423ac27d3b6b473c61b1fe41905aca1
2021-01-23 18:28:43 +01:00
tiago
54bf7f9a59
check if last command successful
2021-01-23 17:10:32 +00:00
tiago
bb6354e205
removed trailing spaces
2021-01-23 14:42:58 +00:00
Noah Gorny
2a2741d761
Merge pull request #1810 from NoahGorny/disable-keep-padding
...
Disable keep-padding option in shfmt
2021-01-23 09:45:15 +02:00
tiago
c7f6e80ad0
fix modern theme, added virtualenv name
2021-01-22 17:07:16 +00:00
BarbUk
f86d823dc3
Disable SC2207 to keep COMPREPLY simple
2021-01-22 18:41:16 +04:00
Noah Gorny
d2ab59fef8
Disable keep-padding option in shfmt
...
Has some serious bugs and not really needed
Also fixed all files that need to be changed after this
2021-01-21 22:08:45 +02:00
BarbUk
b92f53ece5
Update atomic theme with correct compgen syntax
2021-01-16 23:21:04 +01:00
BarbUk
ef42c822e6
Update brainy theme with correct compgen syntax
2021-01-16 23:18:58 +01:00
Noah Gorny
79df5ffc3c
Merge pull request #1789 from BarbUk/fix/rbenv_version_prompt
...
Fix rbenv version prompt
2021-01-16 20:18:47 +02:00
Noah Gorny
18781ed397
Merge pull request #1764 from cornfeedhobo/history-plugins
...
refactor all history modifications into discrete plugins
2021-01-16 19:32:29 +02:00
Noah Gorny
988e966df3
Merge pull request #1773 from tbhaxor/feature/clipboard-copy
...
added alias for xclip command
2021-01-16 13:27:05 +02:00
BarbUk
814ff562e9
Fix rbenv version prompt
2021-01-16 09:25:12 +01:00
BarbUk
86fd073ee6
Clean brunton
2021-01-16 09:13:23 +01:00
BarbUk
662a5c4ac7
Clean brainy
2021-01-16 09:13:10 +01:00
BarbUk
eadd2685df
Clean bobby
2021-01-16 09:12:59 +01:00
BarbUk
8691894175
Clean bira
2021-01-16 09:12:42 +01:00
BarbUk
cfb9a22e70
Clean binaryanomaly
2021-01-16 09:12:20 +01:00
BarbUk
fb0fa7f799
Clean bakke
2021-01-16 09:12:06 +01:00
BarbUk
59fc8c818d
Update clean_files.txt
2021-01-16 09:11:26 +01:00
cornfeedhobo
4044f4123c
add top-history
2021-01-15 11:57:41 -06:00
cornfeedhobo
61f727fb96
refactor all history modifications into discrete plugins
2021-01-15 11:53:28 -06:00
Noah Gorny
5e667ed476
Merge pull request #1783 from BarbUk/clean/theme_atomic_and_axin
...
Clean atomic and axin theme
2021-01-14 15:20:38 +02:00
BarbUk
bd6dbd3edf
Merge branch 'master' into clean/theme_atomic_and_axin
2021-01-14 13:45:31 +01:00
Noah Gorny
bb35450c17
Merge pull request #1733 from tbhaxor/patch-1
...
Added git alias to list only conflicted files
2021-01-13 21:32:33 +02:00
Noah Gorny
610980dd23
git: aliases: Move glsu to glsum in ls-files and add glsut
2021-01-13 21:19:55 +02:00
Noah Gorny
a9b0ec7d1d
Merge pull request #1785 from marcospereira/lint/themes/base.theme.bash
...
Add themes/base.theme.bash to clean files
2021-01-13 19:15:09 +02:00
Gurkirat Singh
957cd578f7
Added git alias to list only conflicted files
2021-01-13 19:08:41 +02:00
Noah Gorny
a0ea33d671
Merge pull request #1778 from tbhaxor/bugfix/vue-routes
...
fixed existing completion and added conditional completion
2021-01-13 19:06:10 +02:00
Noah Gorny
bc32b40088
Merge pull request #1784 from marcospereira/support-sdkman-different-output-formats
...
Support multiple sdkman output formats
2021-01-13 19:02:35 +02:00
Noah Gorny
70fa3f8d25
aliases: clipboard: Remove command_exists check
2021-01-13 18:43:04 +02:00
Noah Gorny
bac50413f1
Merge pull request #1743 from georgettica/georgettica/sort-git-aliases
...
refactor(aliases): sort
2021-01-13 18:40:55 +02:00
Noah Gorny
da662d1332
aliases: clipboard: Add shellcheck header
2021-01-13 18:30:32 +02:00
Gurkirat Singh
9f66059f52
aliases: clipboard: Add more aliases for xclip command
...
Also lint and cleanup the file
2021-01-13 18:29:57 +02:00
Noah Gorny
dd4e410a32
aliases: git: Add shellcheck header
2021-01-13 18:24:53 +02:00
Noah Gorny
8723fc56b2
aliases: git: Sort all commands, even miniscule ones
2021-01-13 18:24:16 +02:00
Ron Green
436381de93
refactor(aliases): sort git aliases file and lint it
...
- move all comments to the same line so they wont be jumbled
- also add to clean_files.txt
2021-01-13 18:24:13 +02:00
Marcos Pereira
94d261b42d
Fix shellcheck warnings for themes/base.theme.bash
2021-01-12 00:55:15 -05:00
Marcos Pereira
5a761b7ae3
Run code fomatter for themes/base.theme.bash
2021-01-11 15:14:49 -05:00
Marcos Pereira
3f29862478
Add themes/base.theme.bash to clean files
2021-01-11 15:12:39 -05:00
Marcos Pereira
08ff08e043
Support multiple sdkman output formats
...
sdkman has a specific output format for Java candidate since
there are multiple vendors and builds. For example, when running
`sdk list maven`, the format is a simple list like:
3.6.2
3.6.1
3.6.0
3.5.4
3.5.3
3.5.2
3.5.0
3.3.9
But for `sbt list java`, the output is a table like:
================================================================================
Vendor | Use | Version | Dist | Status | Identifier
--------------------------------------------------------------------------------
AdoptOpenJDK | | 15.0.1.j9 | adpt | | 15.0.1.j9-adpt
| | 15.0.1.hs | adpt | installed | 15.0.1.hs-adpt
...
Amazon | | 15.0.1 | amzn | | 15.0.1-amzn
| | 11.0.9 | amzn | | 11.0.9-amzn
...
Azul Zulu | | 15.0.1 | zulu | | 15.0.1-zulu
| | 15.0.1.fx | zulu | | 15.0.1.fx-zulu
...
Therefore, the completion script has to handle both formats.
2021-01-11 11:16:15 -05:00
BarbUk
e574abbbba
Clean theme atomic
2021-01-11 11:42:04 +01:00
BarbUk
6495e3479e
Clean theme axin
2021-01-11 11:41:44 +01:00
BarbUk
df73085fea
Update clean file
2021-01-11 11:41:22 +01:00
Gurkirat Singh
6065d003e8
fixed existing completion and added conditional completion
2021-01-10 00:34:14 +05:30
Noah Gorny
c268cd9abc
Merge pull request #1777 from NoahGorny/dnf-aliases-fedora
...
dnf aliases fedora
2021-01-09 20:31:05 +02:00
Noah Gorny
342ddcfca0
Add dnf.aliases.bash to clean_files.txt
2021-01-09 19:03:44 +02:00
zuck007
73d28f0b27
removing redundant lines
2021-01-09 19:03:17 +02:00
zuck007
f18562279c
dnf aliases for fedora_22+ distros
2021-01-09 19:03:17 +02:00
zuck007
2ae03668c4
added dnf aliases for fedora distro
2021-01-09 19:03:17 +02:00
zuck007
91f63c0b68
adding dnf aliases for fedora distro
2021-01-09 19:03:17 +02:00
David Farrell
e932d8371f
Add hooks to check .sh and .bash headers - Fixes #1491 ( #1765 )
...
* Add hooks to check .sh and .bash headers
* Adds hooks/ to clean_files.txt
2021-01-09 18:02:26 +02:00
Noah Gorny
3fce1ffe8d
Merge pull request #1775 from marcospereira/cleanup/sdkman
...
Add sdkman bash completion to the list of clean files
2021-01-09 00:36:44 +02:00
Marcos Pereira
fe7d3ef177
Format sdkman bash completion with shfmt
2021-01-08 16:42:18 -05:00
Marcos Pereira
56348b1a12
Add sdkman bash completion to clean_files
2021-01-08 16:38:08 -05:00
Noah Gorny
cc3bdc2b57
Merge pull request #1767 from NoahGorny/disable-macos-11
...
ci: Remove macos-11.0 as it is unreliable
2021-01-08 19:40:41 +02:00
Noah Gorny
d97a36af88
Merge pull request #1697 from NoahGorny/clean-agnoster-theme
...
clean agnoster theme
2021-01-07 20:21:43 +02:00
Noah Gorny
c5f02b769d
Merge pull request #1763 from marcospereira/sdkman-update
...
Add support to newer versions of sdkman
2021-01-07 19:50:00 +02:00
Noah Gorny
81e3f1482b
ci: Remove macos-11.0 as it is unreliable
2021-01-07 19:29:45 +02:00
Noah Gorny
c168122ff5
Add agnoster theme to clean_files.txt
2021-01-07 19:12:34 +02:00
Noah Gorny
f255d03057
shellcheck agnoster theme
2021-01-07 19:11:22 +02:00
Noah Gorny
60da498ed4
shfmt agnoster theme
2021-01-07 19:11:22 +02:00
BarbUk
ae9da3b62b
Clean barbuk theme ( #1766 )
2021-01-07 19:05:00 +02:00
cornfeedhobo
3c00fe6dbb
Merge pull request #1759 from cornfeedhobo/add-basher-plugin
...
add plugin for basher
2021-01-05 09:35:13 -06:00
Marcos Pereira
5ca2c43aed
Add support to newer versions of sdkman
...
Some new commands are available, and also aliases
for commands such as `i` for `install`.
2021-01-04 18:18:13 -05:00
cornfeedhobo
0b6ecf705d
add plugin for basher
2021-01-02 23:05:05 -06:00
Noah Gorny
3addebb66b
Merge pull request #1760 from cornfeedhobo/editorconfig-fixes
...
Editorconfig fixes
2021-01-02 00:42:22 +02:00
cornfeedhobo
ded58f25e3
include test/run in editorconfig
2021-01-01 14:25:23 -06:00
cornfeedhobo
b8dda491c7
fix wildcard matches to include path separators
2021-01-01 14:24:34 -06:00
Noah Gorny
13020874a9
Merge pull request #1758 from NoahGorny/update-contributing
...
Update contributing document
2021-01-01 11:23:04 +02:00
Noah Gorny
3c0235b44b
docs: contributing: Remove bullets already covered by our templates
2020-12-29 22:06:22 +02:00
Noah Gorny
aeb0cb7353
docs: contributing: Add section about invoking with command builtin
2020-12-29 22:06:22 +02:00
Noah Gorny
49886620c4
docs: contributing: Mention github actions instead of travis
2020-12-29 22:06:10 +02:00