pull/1114/head
parent
7be5f99e16
commit
c441fd830f
38
README.md
38
README.md
|
|
@ -44,7 +44,7 @@ please feel free to read through this page if you're interested in how Bash-it l
|
||||||
3. Edit your modified config (`~/.bash_profile` or `~/.bashrc`) file in order to customize Bash-it.
|
3. Edit your modified config (`~/.bash_profile` or `~/.bashrc`) file in order to customize Bash-it.
|
||||||
4. Check out available aliases, completions, and plugins and enable the ones you want to use (see the next section for more details).
|
4. Check out available aliases, completions, and plugins and enable the ones you want to use (see the next section for more details).
|
||||||
|
|
||||||
#### INSTALL OPTIONS
|
### INSTALL OPTIONS
|
||||||
|
|
||||||
The install script can take the following options:
|
The install script can take the following options:
|
||||||
|
|
||||||
|
|
@ -74,7 +74,7 @@ fi
|
||||||
Refer to the official [Bash documentation](https://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files) to get more info.
|
Refer to the official [Bash documentation](https://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files) to get more info.
|
||||||
|
|
||||||
|
|
||||||
#### Install using Docker
|
### Install using Docker
|
||||||
|
|
||||||
You can try Bash-it in an isolated environment without changing any local files via a [Docker](https://www.docker.com/) Container.
|
You can try Bash-it in an isolated environment without changing any local files via a [Docker](https://www.docker.com/) Container.
|
||||||
(Bash Shell v4.4 with Bash-it, [bats](https://github.com/sstephenson/bats) and bash-completion based on [Alpine Linux](https://alpinelinux.org/)).
|
(Bash Shell v4.4 with Bash-it, [bats](https://github.com/sstephenson/bats) and bash-completion based on [Alpine Linux](https://alpinelinux.org/)).
|
||||||
|
|
@ -84,7 +84,7 @@ You can try Bash-it in an isolated environment without changing any local files
|
||||||
Have a look at our [bash-it-docker repository](https://github.com/Bash-it/bash-it-docker) for further information.
|
Have a look at our [bash-it-docker repository](https://github.com/Bash-it/bash-it-docker) for further information.
|
||||||
|
|
||||||
|
|
||||||
#### Updating
|
### Updating
|
||||||
|
|
||||||
To update Bash-it to the latest version, simply run:
|
To update Bash-it to the latest version, simply run:
|
||||||
|
|
||||||
|
|
@ -120,7 +120,7 @@ bash-it help plugins # shows help for installed plugins
|
||||||
If you need to quickly find out which of the plugins, aliases or completions are available for a specific framework, programming language, or an environment, you can _search_ for multiple terms related to the commands you use frequently.
|
If you need to quickly find out which of the plugins, aliases or completions are available for a specific framework, programming language, or an environment, you can _search_ for multiple terms related to the commands you use frequently.
|
||||||
Search will find and print out modules with the name or description matching the terms provided.
|
Search will find and print out modules with the name or description matching the terms provided.
|
||||||
|
|
||||||
#### Syntax
|
### Syntax
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash-it search term1 [[-]term2] [[-]term3]....
|
bash-it search term1 [[-]term2] [[-]term3]....
|
||||||
|
|
@ -138,7 +138,7 @@ Search command helps you find related modules so that you can decide which of th
|
||||||
|
|
||||||
Currently enabled modules will be shown in green.
|
Currently enabled modules will be shown in green.
|
||||||
|
|
||||||
#### Searching with Negations
|
### Searching with Negations
|
||||||
|
|
||||||
You can prefix a search term with a "-" to exclude it from the results.
|
You can prefix a search term with a "-" to exclude it from the results.
|
||||||
In the above example, if we wanted to hide `chruby` and `chruby-auto`,
|
In the above example, if we wanted to hide `chruby` and `chruby-auto`,
|
||||||
|
|
@ -151,12 +151,12 @@ we could change the command as follows:
|
||||||
completions: bundler gem rake
|
completions: bundler gem rake
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Using Search to Enable or Disable Components
|
### Using Search to Enable or Disable Components
|
||||||
|
|
||||||
By adding a `--enable` or `--disable` to the search command, you can automatically enable all modules that come up as a result of a search query.
|
By adding a `--enable` or `--disable` to the search command, you can automatically enable all modules that come up as a result of a search query.
|
||||||
This could be quite handy if you like to enable a bunch of components related to the same topic.
|
This could be quite handy if you like to enable a bunch of components related to the same topic.
|
||||||
|
|
||||||
#### Disabling ASCII Color
|
### Disabling ASCII Color
|
||||||
|
|
||||||
To remove non-printing non-ASCII characters responsible for the coloring of the search output, you can set environment variable `NO_COLOR`.
|
To remove non-printing non-ASCII characters responsible for the coloring of the search output, you can set environment variable `NO_COLOR`.
|
||||||
Enabled components will then be shown with a checkmark:
|
Enabled components will then be shown with a checkmark:
|
||||||
|
|
@ -221,7 +221,7 @@ After the uninstall script finishes, remove the Bash-it directory from your mach
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
|
|
||||||
#### Bash Profile Aliases
|
### Bash Profile Aliases
|
||||||
|
|
||||||
Bash-it creates a `reload` alias that makes it convenient to reload
|
Bash-it creates a `reload` alias that makes it convenient to reload
|
||||||
your Bash profile when you make changes.
|
your Bash profile when you make changes.
|
||||||
|
|
@ -229,7 +229,7 @@ your Bash profile when you make changes.
|
||||||
Additionally, if you export `BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE` as a non-null value,
|
Additionally, if you export `BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE` as a non-null value,
|
||||||
Bash-it will automatically reload itself after activating or deactivating plugins, aliases, or completions.
|
Bash-it will automatically reload itself after activating or deactivating plugins, aliases, or completions.
|
||||||
|
|
||||||
#### Prompt Version Control Check
|
### Prompt Version Control Check
|
||||||
|
|
||||||
Bash-it provides prompt themes the ability to check and display version control information for the current directory.
|
Bash-it provides prompt themes the ability to check and display version control information for the current directory.
|
||||||
The information is retrieved for each directory and can slow down the navigation of projects with a large number of files and folders.
|
The information is retrieved for each directory and can slow down the navigation of projects with a large number of files and folders.
|
||||||
|
|
@ -251,11 +251,11 @@ It is possible for themes to ignore the `SCM_CHECK` flag and query specific vers
|
||||||
For example, themes that use functions like `git_prompt_vars` skip the `SCM_CHECK` flag to retrieve and display git prompt information.
|
For example, themes that use functions like `git_prompt_vars` skip the `SCM_CHECK` flag to retrieve and display git prompt information.
|
||||||
If you turned version control checking off and you still see version control information within your prompt, then functions like `git_prompt_vars` are most likely the reason why.
|
If you turned version control checking off and you still see version control information within your prompt, then functions like `git_prompt_vars` are most likely the reason why.
|
||||||
|
|
||||||
#### Git prompt
|
### Git prompt
|
||||||
|
|
||||||
Bash-it has some nice features related to Git, continue reading to know more about these features.
|
Bash-it has some nice features related to Git, continue reading to know more about these features.
|
||||||
|
|
||||||
#### Repository info in the prompt
|
### Repository info in the prompt
|
||||||
|
|
||||||
Bash-it can show some information about Git repositories in the shell prompt: the current branch, tag or commit you are at, how many commits the local branch is ahead or behind from the remote branch, and if you have changes stashed.
|
Bash-it can show some information about Git repositories in the shell prompt: the current branch, tag or commit you are at, how many commits the local branch is ahead or behind from the remote branch, and if you have changes stashed.
|
||||||
|
|
||||||
|
|
@ -272,7 +272,7 @@ Set `SCM_GIT_SHOW_DETAILS` to 'false' to **don't show** it:
|
||||||
|
|
||||||
**NOTE:** If using `SCM_GIT_SHOW_MINIMAL_INFO=true`, then the value of `SCM_GIT_SHOW_DETAILS` is ignored.
|
**NOTE:** If using `SCM_GIT_SHOW_MINIMAL_INFO=true`, then the value of `SCM_GIT_SHOW_DETAILS` is ignored.
|
||||||
|
|
||||||
#### Remotes and remote branches
|
### Remotes and remote branches
|
||||||
|
|
||||||
In some git workflows, you must work with various remotes, for this reason, Bash-it can provide some useful information about your remotes and your remote branches, for example, the remote on you are working, or if your local branch is tracking a remote branch.
|
In some git workflows, you must work with various remotes, for this reason, Bash-it can provide some useful information about your remotes and your remote branches, for example, the remote on you are working, or if your local branch is tracking a remote branch.
|
||||||
|
|
||||||
|
|
@ -292,7 +292,7 @@ Set `SCM_GIT_SHOW_REMOTE_INFO` to 'false' to **disable the feature**:
|
||||||
|
|
||||||
**NOTE:** If using `SCM_GIT_SHOW_MINIMAL_INFO=true`, then the value of `SCM_GIT_SHOW_REMOTE_INFO` is ignored.
|
**NOTE:** If using `SCM_GIT_SHOW_MINIMAL_INFO=true`, then the value of `SCM_GIT_SHOW_REMOTE_INFO` is ignored.
|
||||||
|
|
||||||
#### Untracked files
|
### Untracked files
|
||||||
|
|
||||||
By default, the `git status` command shows information about *untracked* files.
|
By default, the `git status` command shows information about *untracked* files.
|
||||||
This behavior can be controlled through command-line flags or git configuration files.
|
This behavior can be controlled through command-line flags or git configuration files.
|
||||||
|
|
@ -312,7 +312,7 @@ Also, with this flag to false, Bash-it will not show the repository as dirty whe
|
||||||
|
|
||||||
**NOTE:** If you set in git configuration file the option to ignore *untracked* files, this flag has no effect, and Bash-it will ignore *untracked* files always.
|
**NOTE:** If you set in git configuration file the option to ignore *untracked* files, this flag has no effect, and Bash-it will ignore *untracked* files always.
|
||||||
|
|
||||||
#### Git user
|
### Git user
|
||||||
|
|
||||||
In some environments, it is useful to know the value of the current git user, which is used to mark all new commits.
|
In some environments, it is useful to know the value of the current git user, which is used to mark all new commits.
|
||||||
For example, any organization that uses the practice of pair programming will typically author each commit with [combined names of the two authors](https://github.com/pivotal/git_scripts).
|
For example, any organization that uses the practice of pair programming will typically author each commit with [combined names of the two authors](https://github.com/pivotal/git_scripts).
|
||||||
|
|
@ -333,11 +333,11 @@ You can control the prefix and the suffix of this component using the two variab
|
||||||
|
|
||||||
And
|
And
|
||||||
|
|
||||||
* `export SCM_THEME_CURRENT_USER_SUFFIX=' '``
|
* `export SCM_THEME_CURRENT_USER_SUFFIX=' ☺︎ '`
|
||||||
|
|
||||||
**NOTE:** If using `SCM_GIT_SHOW_MINIMAL_INFO=true`, then the value of `SCM_GIT_SHOW_CURRENT_USER` is ignored.
|
**NOTE:** If using `SCM_GIT_SHOW_MINIMAL_INFO=true`, then the value of `SCM_GIT_SHOW_CURRENT_USER` is ignored.
|
||||||
|
|
||||||
#### Git show minimal status info
|
### Git show minimal status info
|
||||||
|
|
||||||
To speed up the prompt while still getting minimal git status information displayed such as the value of `HEAD` and whether there are any dirty objects, you can set:
|
To speed up the prompt while still getting minimal git status information displayed such as the value of `HEAD` and whether there are any dirty objects, you can set:
|
||||||
|
|
||||||
|
|
@ -345,7 +345,7 @@ To speed up the prompt while still getting minimal git status information displa
|
||||||
export SCM_GIT_SHOW_MINIMAL_INFO=true
|
export SCM_GIT_SHOW_MINIMAL_INFO=true
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Ignore repo status
|
### Ignore repo status
|
||||||
|
|
||||||
When working in repos with a large codebase, Bash-it can slow down your prompt when checking the repo status.
|
When working in repos with a large codebase, Bash-it can slow down your prompt when checking the repo status.
|
||||||
To avoid it, there is an option you can set via Git config to disable checking repo status in Bash-it.
|
To avoid it, there is an option you can set via Git config to disable checking repo status in Bash-it.
|
||||||
|
|
@ -364,7 +364,7 @@ $ git config --global --add bash-it.hide-status 1
|
||||||
|
|
||||||
Setting this flag globally has the same effect as `SCM_CHECK=true`, but only for Git repos.
|
Setting this flag globally has the same effect as `SCM_CHECK=true`, but only for Git repos.
|
||||||
|
|
||||||
#### Pass function renamed to passgen
|
### Pass function renamed to passgen
|
||||||
|
|
||||||
The Bash-it `pass` function has been renamed to `passgen` in order to avoid a naming conflict with the [pass password manager](https://www.passwordstore.org/).
|
The Bash-it `pass` function has been renamed to `passgen` in order to avoid a naming conflict with the [pass password manager](https://www.passwordstore.org/).
|
||||||
In order to minimize the impact on users of the legacy Bash-it `pass` function, Bash-it will create the alias `pass` that calls the new `passgen` function if the `pass` password manager command is not found on the `PATH` (default behavior).
|
In order to minimize the impact on users of the legacy Bash-it `pass` function, Bash-it will create the alias `pass` that calls the new `passgen` function if the `pass` password manager command is not found on the `PATH` (default behavior).
|
||||||
|
|
@ -379,7 +379,7 @@ Unset `BASH_IT_LEGACY_PASS` to have Bash-it **return to default behavior**:
|
||||||
|
|
||||||
* `unset BASH_IT_LEGACY_PASS`
|
* `unset BASH_IT_LEGACY_PASS`
|
||||||
|
|
||||||
#### Proxy Support
|
### Proxy Support
|
||||||
|
|
||||||
If you are working in a corporate environment where you have to go through a proxy server for internet access,
|
If you are working in a corporate environment where you have to go through a proxy server for internet access,
|
||||||
then you know how painful it is to configure the OS proxy variables in the shell,
|
then you know how painful it is to configure the OS proxy variables in the shell,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue