Commit Graph

20 Commits (1ffbc85a62edd16796adcccaba8179ebe735b04a)

Author SHA1 Message Date
Noah Gorny 13531c9534 lib: search: Increase delay in _bash-it-flash-term to 0.2 secs 2022-03-08 00:02:23 +02: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 ddf75f17ac lib/search: fix variable scope 2022-02-17 20:46:28 -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 00f5f2a62e Use `_bash-it-egrep()` 2021-10-18 22:08:56 -04: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
John McBride 036c26dbed Update jump plugin
- remove z plugin
- remove fasd plugin
- update test that referenced fsad

Signed-off-by: John McBride <jpmmcbride@gmail.com>
2020-02-03 11:43:24 -07:00
Konstantin Gredeskoul 09c2be9d6b Refactor (extract utilities + add tests) & more…
* Extracting common utilities into utilities.bash
 * Adding new tests for utilities
 * Relocating the cache file to be under $BASH_IT
 * Removing cache cleanup deferral code for now
 * Wiping the cache in local_setup in tests.
2018-11-23 16:40:35 -08:00
Konstantin Gredeskoul baae0305b6 Speed up bash-it Search & support exact matches
This commit improves Bash-It search functionality in a couple of ways:

 * bash-it search (with no arguments) will print detailed help.
 * bash-it search now accepts terms prefixed with '@' sign, indicating an exact match.
 * bash-it search now performs smarter caching of the component listings/status

New search syntax is as follows:

   bash-it search [-|@]term1 [-|@]term2 [ --enable | --disable | --help ]
2018-11-19 11:55:36 -08:00
Eduardo Bellido Bellido 5f2a4b5d8b Fix search command for RedHat based distributions 2016-11-14 01:26:10 +01:00
Konstantin Gredeskoul db5061cf80 Better tests, more resilience and a bug fix 2016-05-12 04:04:51 -07:00
Konstantin Gredeskoul 1a02db13bc Adding documentation 2016-05-07 06:39:40 -07:00
Konstantin Gredeskoul 9bb2d377a8 Enable/Disable with negated search feature 2016-05-07 06:26:30 -07:00
Konstantin Gredeskoul fb6a6c80c0 Highlighting color of enabled components 2016-05-07 04:23:03 -07:00
Konstantin Gredeskoul ffbeeacc54 Moving search into its own module before more work 2016-05-07 04:19:03 -07:00