* 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
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.
Silence errors when installing
```
Would you like to enable the ag aliases? [y/N] y
~/.bash_it/lib/helpers.bash: line 488: _bash-it-clean-component-cache: command not found
ag enabled with priority 150.
```
NOTE: This doesn't make Bash-it usable as there's so many similar errors scattered in other locations, this commit simply makes installer works
Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
In addition to the regular /etc/bash_completion, the one from Homebrew
is loaded when running on OS X, and when Homebrew is installed.
Also added the system completion to the default install options, since
this is a feature that's requested frequently.
Removed Jekyll template option - it does not really belong in Bash-it.
Removed the all/some/none options. Most people selected `all` and then
complained about things not working, or error messages being shown. This
was mostly due to missing dependencies.
The installer now uses a 'sane' default - it just enables completion for
the 'bash-it' command and nothing else. At the end of the installation,
it prints a message explaining the ways to see the available plugins and
how to enable them.
Updated readme with install options
The install script now allows to specify one of the following options:
* --all
* --none
Both result in any questions being skipped. This is convenient when running the install script from a script, or a provisioning tool like Ansible.
When selecting all, I get the following in my plugins/enabled directory
$ cd ~/.bash_it/plugins/enabled && ls -l
<snip fileinfo> * -> ~/.bash_it/plugins/[^_]available/*
In other words, the regexp is not being expanded, and I don't think bash
has ever had this capability (I am running 4.2.24) . Looking at the commit
24431627ab24c1c97bf3fb5796037e198f465e25, this line was added so as to disable
some plugins starting with a "_". In this circumstance, this line is
wrong anyway as it skips the directory "_available", rather than
available/_whatever.
This commit aims to fix this to the installer's intended purpose.
It also does a sanity check that no file exists already in enabled and
skips otherwise. ln -s does the right thing however more human error
message might be more desirable.
The ls command in for loop has a pattern now, so full paths are
returned. The user prompt and symbolic link have been updated to handle
this.
Also, not all plugins have '.plugin.' in the middle of their names and
weren't showing up on user prompt. With this commit, everything after
the first period in the file name is stripped.