Commit Graph

59 Commits (9f146f937a287fa979c9d9c4fd4f3586bb022b59)

Author SHA1 Message Date
Noah Gorny f78139fc05 install: Use new profile load command 2021-09-29 00:30:24 +03:00
Noah Gorny 2e3fe0a1ea install: Load log file 2021-09-29 00:30:24 +03:00
Noah Gorny 0dbf1d593c
Merge pull request #1926 from gaelicWizard/basenamed
Use parameter substitution instead of `dirname`/`basename`, where safe to do so
2021-09-18 18:26:55 +03: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 D Pell dee55a03cc drop `dirname` in favor of native Bash strings (1 of 2)
Convert `var=${dirname $filename)` to `var="${filename%/*}` in cases where there is no ambiguity.

Make sure that the path in `$BASH_IT` is absolute because this path gets embedded in the template `.bash_profile` file if selected by the user.
2021-09-16 16:59:02 -07:00
Noah Gorny a8b43620f8 install: Dont quote number vars, to support older bash versions 2021-04-01 17:59:59 +03:00
Noah Gorny 5c192575ce install: Add bash-it prefix to all functions 2021-02-06 20:36:04 +02:00
Noah Gorny 3e7adde638 install: Move to double brackets in check_for-backup check 2021-02-06 20:25:56 +02:00
Noah Gorny af17501318 install: Add --overwrite-backup flag
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.
2021-02-06 00:15:20 +02:00
Noah Gorny 9e37f0d09e install: Move backup check into a separate function 2021-02-06 00:15:20 +02:00
Noah Gorny ef10bcd151 install: Move modify config check into separate function
This helps us make the logic easier to read, and remove unneeded
confusion.
2021-02-06 00:15:20 +02:00
buhl 49d7d2e8c4 Getting Bash-it to use the vendored composure
Fixed tests
Fixed install.sh and bash_it.sh
Added gitattributes to the vendor folder
Changed documentation
2021-02-02 16:34:04 +01:00
Noah Gorny 501b1ab3b5
Merge pull request #1730 from NoahGorny/fix-1037
Disable auto-reload in install.sh
2020-12-16 20:08:06 +02:00
egvimo 3019dc331d
Add option to append template to existing config (#1723)
* Add option to append template to existing config

* Add test for append-to-config option

Co-authored-by: Egor Moor <egor.moor@edag-ps.com>
2020-12-11 16:32:23 +02:00
Noah Gorny e873252227 Disable auto-reload in install.sh 2020-12-06 23:55:25 +02:00
Kyle Welsby 56945e3bdf
Fixes #1309 _bash-it-clean-component-cache: command not found
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.
```
2019-01-16 17:15:23 +00:00
polytomous 82ee86222e
INSANE EDIT: Pick a less crazy word than "sane" 2018-03-16 18:51:48 -07:00
Nils Winkler 54774d4f59 Using the existing enable function for interactive install 2017-06-24 17:31:30 +02:00
Nils Winkler 3ecf684eb6 Switched loading of single components to existing functions 2017-06-24 17:31:30 +02:00
林博仁 63c4ace648 Make installer more path-with-spaces-proof, fixes #952
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>
2017-05-02 11:06:19 +08:00
Shingo Kitagawa 00d17ff16a add --no-modify-config flag to install.sh 2016-11-04 17:42:40 +09:00
ravenhall 49afeb707e Added forgotten -e and moved funcs to the top to prevent scoping issue 2016-05-31 18:45:36 -05:00
ravenhall c6c21abb0e Colorized error, relocated installing message, created backup_new func, reformatted do 2016-05-31 14:14:12 -05:00
ravenhall 11311b17f6 Implemented solution to issue #676 2016-05-19 22:08:46 -05:00
Nils Winkler 696d0e50b0 Fixed indentation
Removed tabs, using 2 spaces everywhere.
2016-01-08 08:26:55 +01:00
Nils Winkler 28071aba21 Merge pull request #641 from spectrumIG/Issue-621
Add follow sym link and option to append template to existing .bashrc
2016-01-08 08:20:06 +01:00
Daniele Andreoli 245fcfa49b Fix wrong pipe. Add in any case a backup file for compatibility 2016-01-08 02:20:18 +01:00
Daniele Andreoli fdc75e42b9 Add while block to allow correct choice 2016-01-07 09:23:36 +01:00
Daniele Andreoli 55245cc98e Fix typo and missing spaces 2016-01-07 09:20:23 +01:00
Daniele Andreoli a3efe1479a Add follow sym link and option to append template to existing .bashrc 2016-01-06 12:53:05 +01:00
Nils Winkler 38bd3a3b99 Loading Homebrew Bash Completion if installed
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.
2016-01-05 07:35:02 +01:00
Nils Winkler 127ac23eea Added base plugin to default install
Fixes #609
2015-12-22 09:42:22 +01:00
Nils Winkler c0a214294d Merge pull request #598 from justin8/change-install-location
Fix for OS X installation
2015-10-22 16:26:40 +02:00
Justin Dray dd8831faf1 Fix for OS X installation 2015-10-22 16:20:44 +02:00
Nils Winkler d8e16c36a2 Merge pull request #589 from justin8/change-install-location
Allow for any install location
2015-10-21 09:14:51 +02:00
Justin Dray dad983adb5 Remove exit from install. Update readme for install locations 2015-10-16 16:27:58 +02:00
Nils Winkler 36caf70f8d Renamed alias-completion file to match naming conventions 2015-10-15 11:28:58 +02:00
Nils Winkler c43f3d8327 Enabling general aliases by default 2015-10-15 11:28:49 +02:00
Justin Dray 7923b865ea Allow for any install location 2015-10-14 13:08:04 +00:00
Nils Winkler 7384b284ec Added alias completion to the default install options 2015-09-07 09:56:16 +02:00
Nils Winkler 63add1f86a Added load_some function again
It can be called by providing the `--interactive` switch to the install
script.
2015-08-06 16:52:37 +02:00
Nils Winkler 237816b782 Updated install script
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
2015-08-06 09:51:39 +02:00
Benjamin Brombach 4510c9ee63 fixes #343 by surrounding $HOME (which can have spaces) with quotations marks 2015-04-29 14:56:46 +02:00
Nils Winkler a2bddd5c75 Updated install script
All of the install questions are now using the same syntax and semantics
for read/echo/case.
2015-04-26 12:00:17 +02:00
shaief 5a5f3d99d2 Add confirmation before deleting .bak file. Add message when installation script ends. 2015-04-22 11:17:08 +03:00
Ivan Povalyukhin c81971d1d8 preserve attributes of $CONFIG_FILE on backup 2015-04-11 15:51:26 -07:00
Nils Winkler f3ca9f53d3 Added option for skipping questions in installer.
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.
2015-03-11 13:08:14 +01:00
Ivan Tham 63cc12271e Minor edits to install.sh for easy install 2015-01-26 21:20:25 +08:00
Eduardo Bellido Bellido d462a35c9a Fixes issue #173 2015-01-09 22:50:09 +01:00
John A. Barbuto 10bda0c111 Use relative symlinks during installation
When using dotfiles synced between different machines, this allows
enabled aliases, completions, and plugins to work with varying
home directories.
2014-04-05 15:28:58 -07:00