Commit Graph

17 Commits (a9a40a3cad024add8fbbace487e4005389674dff)

Author SHA1 Message Date
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
cornfeedhobo 2c8ee40566
Fix linting errors that snuck in. 2021-12-02 09:14:01 -06: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 a375e7131e Remove executable bit 2021-09-18 22:26:27 -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
Nils Winkler 230bafd0d1
Fixed OS comparison for macOS
This was always failing on macOS instead of working there...

See #1635 for the original commit that introduced this issue.
2020-08-10 09:06:36 +02:00
Kan Li 41084ee678
Fix error "bash: _git_bash_completion_found: command not found..." 2020-08-08 22:09:43 -07:00
cornfeedhobo 42e9017df3
simplify git completion to use system-provided completions only (#1635)
* simplify git completion to use system-provided completions only

* support ubuntu git completion

* only search non-system paths

* only operate on macos.

* no need to return 1 in a plugin

* make alias test happy

* make alias test happy

* make alias test happy

* pass exit code when capturing expected errors

* slightly more understandable code structure

* make better use of the new logging feature
2020-08-08 22:14:41 +02:00
David Farrell f8a1877c72
completion/git: Updates completion script to v2.26.2 2020-04-21 11:25:37 -07:00
trmaphi c8b4ffbac1 Update bash completion for git v2.21.0 2019-04-05 16:38:18 +07:00
Paul Dapolito 28c6d17632 Updating git.completion.bash to latest version from git source code mirror. 2016-04-08 09:38:06 -07:00
Omer Katz bd6b4d8a28 Updated git completion. Fixes #299. 2015-04-21 11:29:45 +03:00
Antti Ahti 423e342282 Add --force-with-lease to git push autocompletion 2015-02-16 14:31:34 +02:00
Can Berk Güder c7f3c65586 Updating git.completion.bash to latest version 2014-08-14 10:39:49 -07:00
Luiz Felipe 868fcd0c41 updating git.completion.bash 2012-05-10 14:52:04 -03:00
Travis Swicegood e115b4c5af Move auto-complete code over to available -> enabled style
This continues the move toward the ability to turn things off with
everything turned on by default.
2011-06-21 09:20:40 -05:00