Commit Graph

3964 Commits (master)

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