Commit Graph

3925 Commits

Author SHA1 Message Date
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