Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into Bash-itGH-1142
Browse files Browse the repository at this point in the history
  • Loading branch information
tswicegood committed Dec 3, 2018
2 parents e5332cb + 703105c commit b5976ad
Show file tree
Hide file tree
Showing 74 changed files with 1,338 additions and 241 deletions.
35 changes: 26 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ When you run without the `--no-modify-config` switch, the Bash-it installer auto
Use the `--no-modify-config` switch to avoid unwanted modifications, e.g. if your Bash config file already contains the code that loads Bash-it.

**NOTE**: Keep in mind how Bash load its configuration files,
`.bash_profile` for login shells (and in macOS in terminal emulators like [Terminal.app](http://www.apple.com/osx/apps/) or
`.bash_profile` for login shells (and in macOS in terminal emulators like [Terminal.app](http://www.apple.com/osx/apps/) or
[iTerm2](https://www.iterm2.com/)) and `.bashrc` for interactive shells (default mode in most of the GNU/Linux terminal emulators),
to ensure that Bash-it is loaded correctly.
A good "practice" is sourcing `.bashrc` into `.bash_profile` to keep things working in all the scenarios.
A good "practice" is sourcing `.bashrc` into `.bash_profile` to keep things working in all the scenarios.
To achieve this, you can add this snippet in your `.bash_profile`:

```
Expand All @@ -76,8 +76,8 @@ Refer to the official [Bash documentation](https://www.gnu.org/software/bash/man

### 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.
(Bash Shell v4.4 with Bash-it, [bats](https://github.com/sstephenson/bats) and bash-completion based on [Alpine Linux](https://alpinelinux.org/)).
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/)).

`docker pull ellerbrock/bash-it`

Expand Down Expand Up @@ -140,7 +140,7 @@ Currently enabled modules will be shown in green.

### 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`,
we could change the command as follows:

Expand Down Expand Up @@ -189,6 +189,7 @@ There are over 50+ Bash-it themes to pick from in `$BASH_IT/themes`.
The default theme is `bobby`.
Set `BASH_IT_THEME` to the theme name you want, or if you've developed your own custom theme outside of `$BASH_IT/themes`,
point the `BASH_IT_THEME` variable directly to the theme file.
To disable theming completely, leave the variable empty.

Examples:

Expand All @@ -198,9 +199,12 @@ export BASH_IT_THEME="powerline-multiline"

# Use a theme outside of the Bash-it folder
export BASH_IT_THEME="/home/foo/my_theme/my_theme.theme.bash"

# Disable theming
export BASH_IT_THEME=""
```

You can easily preview the themes in your own shell using `BASH_PREVIEW=true reload`.
You can easily preview the themes in your own shell using `BASH_PREVIEW=true bash-it reload`.

If you've created your own custom prompts, we'd love it if you shared with everyone else! Just submit a Pull Request.
You can see theme screenshots on [wiki/Themes](https://github.com/Bash-it/bash-it/wiki/Themes).
Expand Down Expand Up @@ -294,8 +298,8 @@ Set `SCM_GIT_SHOW_REMOTE_INFO` to 'false' to **disable the feature**:

### 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.
By default, the `git status` command shows information about *untracked* files.
This behavior can be controlled through command-line flags or git configuration files.
For big repositories, ignoring *untracked* files can make git faster.
Bash-it uses `git status` to gather the repo information it shows in the prompt, so in some circumstances, it can be useful to instruct Bash-it to ignore these files.
You can control this behavior with the flag `SCM_GIT_IGNORE_UNTRACKED`:
Expand All @@ -312,6 +316,19 @@ 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.

### Stash item count

When `SCM_GIT_SHOW_DETAILS` is enabled, you can get the count of *stashed* items. This feature can be useful when a user has a lot of stash items.
This feature is controlled through the flag `SCM_GIT_SHOW_STASH_INFO` as follows:

Set `SCM_GIT_SHOW_STASH_INFO` to 'true' (the default value) to **show** the count of stashed items:

* `export SCM_GIT_SHOW_STASH_INFO=true`

Set `SCM_GIT_SHOW_STASH_INFO` to 'false' to **don't show** it:

* `export SCM_GIT_SHOW_STASH_INFO=false`

### 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.
Expand All @@ -333,7 +350,7 @@ You can control the prefix and the suffix of this component using the two variab

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.

Expand Down
8 changes: 8 additions & 0 deletions aliases/available/bolt.aliases.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cite 'about-alias'
about-alias 'puppet bolt aliases'

# Aliases
alias bolt='bolt command run --tty --no-host-key-check'
alias boltas='bolt -p -u'
alias sudobolt='bolt --run-as root --sudo-password'
alias sudoboltas='sudobolt -p -u'
4 changes: 3 additions & 1 deletion aliases/available/clipboard.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ about-alias 'pbcopy and pbpaste shortcuts to linux'
case $OSTYPE in
linux*)
XCLIP=$(command -v xclip)
[[ $XCLIP ]] && alias pbcopy="$XCLIP -selection clipboard" && alias pbpaste="$XCLIP -selection clipboard -o"
[[ $XCLIP ]] && \
alias pbcopy="$XCLIP -selection clipboard" && \
alias pbpaste="$XCLIP -selection clipboard -o"
;;
esac

Expand Down
39 changes: 39 additions & 0 deletions aliases/available/composer.aliases.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
cite 'about-alias'
about-alias 'common composer abbreviations'

# Aliases
alias coab='composer about'
alias coar='composer archive'
alias cob='composer browser'
alias cocpr='composer check-platform-reqs'
alias cocc='composer clear-cache'
alias cocfg='composer config'
alias cocp='composer create-project'
alias codp='composer depends'
alias codiag='composer diagnose'
alias codmp='composer dump-autoload'
alias coex='composer exec'
alias coglob='composer global'
alias coh='composer help'
alias cohome='composer home'
alias coi='composer install'
alias coinf='composer info'
alias coini='composer init'
alias coli='composer license'
alias colis='composer list'
alias coout='composer outdated'
alias cop='composer prohibits'
alias corem='composer remove'
alias coreq='composer require'
alias coreqd='composer require --dev'
alias cors='composer run-script'
alias cos='composer search'
alias cosu='composer self-update'
alias coshow='composer show'
alias costat='composer status'
alias cosugg='composer suggest'
alias coup='composer update'
alias coupg='composer upgrade'
alias coval='composer validate'
alias cowhy='composer why'
alias cowhyn='composer why-not'
1 change: 1 addition & 0 deletions aliases/available/docker-compose.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ about-alias 'docker-compose abbreviations'
alias dco="docker-compose"
alias dcofresh="docker-compose-fresh"
alias dcol="docker-compose logs -f --tail 100"
alias dcou="docker-compose up"
9 changes: 9 additions & 0 deletions aliases/available/docker.aliases.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cite 'about-alias'
about-alias 'docker abbreviations'

alias dk='docker'
alias dklc='docker ps -l' # List last Docker container
alias dklcid='docker ps -l -q' # List last Docker container ID
alias dklcip='docker inspect -f "{{.NetworkSettings.IPAddress}}" $(docker ps -l -q)' # Get IP of last Docker container
Expand All @@ -25,3 +26,11 @@ alias dkrmi='docker-remove-images' # Delete images for supplied IDs or all if n
alias dkideps='docker-image-dependencies' # Output a graph of image dependencies using Graphiz
alias dkre='docker-runtime-environment' # List environmental variables of the supplied image ID
alias dkelc='docker exec -it `dklcid` bash' # Enter last container (works with Docker 1.3 and above)
alias dkex='docker exec -it ' # Useful to run any commands into container without leaving host
alias dkri='docker run --rm -i '
alias dkrit='docker run --rm -it '

# Added more recent cleanup options from newer docker versions
alias dkip='docker image prune -a -f'
alias dkvp='docker volume prune -f'
alias dksp='docker system prune -a -f'
1 change: 1 addition & 0 deletions aliases/available/git.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ alias gup='git fetch && git rebase'
alias gp='git push'
alias gpo='git push origin'
alias gpu='git push --set-upstream'
alias gpuo='git push --set-upstream origin'
alias gpom='git push origin master'
alias gr='git remote'
alias grv='git remote -v'
Expand Down
1 change: 0 additions & 1 deletion aliases/available/homebrew-cask.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ alias bcin='brew cask install'
alias bcrm='brew cask uninstall'
alias bczp='brew cask zap'
alias bccl='brew cask cleanup'
alias bcsr='brew cask search'
alias bcls='brew cask list'
alias bcinf='brew cask info'
alias bcdr='brew cask doctor'
Expand Down
24 changes: 24 additions & 0 deletions aliases/available/kubectl.aliases.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
#
# -binaryanomaly

cite 'about-alias'
about-alias 'kubectl aliases'

# set apt aliases
function _set_pkg_aliases()
{
if [ -x $(which kubectl) ]; then
alias kc='kubectl'
alias kcgp='kubectl get pods'
alias kcgd='kubectl get deployments'
alias kcgn='kubectl get nodes'
alias kcdp='kubectl describe pod'
alias kcdd='kubectl describe deployment'
alias kcdn='kubectl describe node'
alias kcgpan='kubectl get pods --all-namespaces'
alias kcgdan='kubectl get deployments --all-namespaces'
fi
}

_set_pkg_aliases
3 changes: 3 additions & 0 deletions aliases/available/maven.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ about-alias 'maven abbreviations'

alias mci='mvn clean install'
alias mi='mvn install'
alias mcp='mvn clean package'
alias mp='mvn package'
alias mrprep='mvn release:prepare'
alias mrperf='mvn release:perform'
alias mrrb='mvn release:rollback'
alias mdep='mvn dependency:tree'
alias mpom='mvn help:effective-pom'
alias mcisk='mci -Dmaven.test.skip=true'
alias mcpsk='mcp -Dmaven.test.skip=true'
4 changes: 2 additions & 2 deletions aliases/available/npm.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ alias nod='npm outdated'
alias nrb='npm rebuild'
alias nud='npm update'
alias nr='npm run'
alias nls='npm list'
alias nlsg='npm list --global'
alias nls='npm list --depth=0 2>/dev/null'
alias nlsg='npm list -g --depth=0 2>/dev/null'
18 changes: 9 additions & 9 deletions aliases/available/phoenix.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ about-alias 'phoenix abbreviations'

# Phoenix Commands
alias i='iex'
alias ips='iex -S mix phoenix.server'
alias ips='iex -S mix phx.server'
alias ism='iex -S mix'
alias m='mix'
alias mab='mix archive.build'
Expand Down Expand Up @@ -32,14 +32,14 @@ alias mho='mix hex.outdated'
alias mlh='mix local.hex'
alias mn='mix new'
alias mns='mix new --sup'
alias mpgc='mix phoenix.gen.channel'
alias mpgh='mix phoenix.gen.html'
alias mpgj='mix phoenix.gen.json'
alias mpgm='mix phoenix.gen.model'
alias mpgs='mix phoenix.gen.secret'
alias mpn='mix phoenix.new'
alias mpr='mix phoenix.routes'
alias mps='mix phoenix.server'
alias mpgc='mix phx.gen.channel'
alias mpgh='mix phx.gen.html'
alias mpgj='mix phx.gen.json'
alias mpgm='mix phx.gen.model'
alias mpgs='mix phx.gen.secret'
alias mpn='mix phx.new'
alias mpr='mix phx.routes'
alias mps='mix phx.server'
alias mr='mix run'
alias mrnh='mix run --no-halt'
alias mrl='mix release'
Expand Down
10 changes: 10 additions & 0 deletions aliases/available/puppet.aliases.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cite 'about-alias'
about-alias 'puppet aliases'

# Aliases
alias pupval="puppet parser validate *.pp"
alias puplint="puppet-lint *.pp"
alias pupagt="puppet agent -t"
alias pupagtd="puppet agent -t --debug"
alias pupapp="puppet apply"

2 changes: 1 addition & 1 deletion aliases/available/vault.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ alias vasrv="vault server"
alias vas="vault status"
alias vav="vault version"
alias vaw="vault write"
alias vag="vault auth -method=github"
alias vag="vault login -method=github"
alias varv="vault read -field=value"
3 changes: 3 additions & 0 deletions aliases/available/yarn.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ about-alias 'yarn package manager aliases'
alias ya='yarn'
alias yai='yarn init'
alias yaa='yarn add'
alias yaga='yarn global add'
alias yaad='yarn add --dev'
alias yau='yarn upgrade'
alias yarm='yarn remove'
alias yagrm='yarn global remove'
alias yaod='yarn outdated'
alias yapa='yarn pack'
alias yap='yarn publish'
alias yasu='yarn self-update'
alias yaru='yarn run'
alias yat='yarn test'
alias yas='yarn serve'
alias yacc='yarn cache clean'
alias yack='yarn check'
alias yals='yarn list'
Expand Down
Loading

0 comments on commit b5976ad

Please sign in to comment.