mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-06 11:50:38 +01:00
Merge pull request #181 from vadviktor/vadviktor-elixir-support
Let's add some (basic) Elixir support
This commit is contained in:
@@ -12,6 +12,7 @@ It currently shows:
|
|||||||
- Current Ruby version using chruby; version and gemset when on RVM or Rbenv
|
- Current Ruby version using chruby; version and gemset when on RVM or Rbenv
|
||||||
- Current Node.js version, through NVM (if present) or Node.js
|
- Current Node.js version, through NVM (if present) or Node.js
|
||||||
- Current Perl version using plenv
|
- Current Perl version using plenv
|
||||||
|
- Current Elixir version
|
||||||
- Git status
|
- Git status
|
||||||
- Timestamp
|
- Timestamp
|
||||||
- Current directory
|
- Current directory
|
||||||
@@ -170,6 +171,14 @@ NOTE: You do not need to specify *end* segment - it will be added automatically.
|
|||||||
|`BULLETTRAIN_RUBY_FG`|`white`|Foreground color
|
|`BULLETTRAIN_RUBY_FG`|`white`|Foreground color
|
||||||
|`BULLETTRAIN_RUBY_PREFIX`|`"♦"`|Prefix of the segment
|
|`BULLETTRAIN_RUBY_PREFIX`|`"♦"`|Prefix of the segment
|
||||||
|
|
||||||
|
### Elixir
|
||||||
|
|
||||||
|
|Variable|Default|Meaning
|
||||||
|
|--------|-------|-------|
|
||||||
|
|`BULLETTRAIN_ELIXIR_BG`|`magenta`|Background color
|
||||||
|
|`BULLETTRAIN_ELIXIR_FG`|`white`|Foreground color
|
||||||
|
|`BULLETTRAIN_ELIXIR_PREFIX`|`"💧"`|Prefix of the segment
|
||||||
|
|
||||||
### Go
|
### Go
|
||||||
|
|
||||||
|Variable|Default|Meaning
|
|Variable|Default|Meaning
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ if [ ! -n "${BULLETTRAIN_PROMPT_ORDER+1}" ]; then
|
|||||||
virtualenv
|
virtualenv
|
||||||
nvm
|
nvm
|
||||||
go
|
go
|
||||||
|
elixir
|
||||||
git
|
git
|
||||||
hg
|
hg
|
||||||
cmd_exec_time
|
cmd_exec_time
|
||||||
@@ -105,7 +106,7 @@ fi
|
|||||||
|
|
||||||
# RUBY
|
# RUBY
|
||||||
if [ ! -n "${BULLETTRAIN_RUBY_BG+1}" ]; then
|
if [ ! -n "${BULLETTRAIN_RUBY_BG+1}" ]; then
|
||||||
BULLETTRAIN_RUBY_BG=magenta
|
BULLETTRAIN_RUBY_BG=red
|
||||||
fi
|
fi
|
||||||
if [ ! -n "${BULLETTRAIN_RUBY_FG+1}" ]; then
|
if [ ! -n "${BULLETTRAIN_RUBY_FG+1}" ]; then
|
||||||
BULLETTRAIN_RUBY_FG=white
|
BULLETTRAIN_RUBY_FG=white
|
||||||
@@ -125,6 +126,17 @@ if [ ! -n "${BULLETTRAIN_GO_PREFIX+1}" ]; then
|
|||||||
BULLETTRAIN_GO_PREFIX="go"
|
BULLETTRAIN_GO_PREFIX="go"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ELIXIR
|
||||||
|
if [ ! -n "${BULLETTRAIN_ELIXIR_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_ELIXIR_BG=magenta
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_ELIXIR_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_ELIXIR_FG=white
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_ELIXIR_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_ELIXIR_PREFIX="💧"
|
||||||
|
fi
|
||||||
|
|
||||||
# DIR
|
# DIR
|
||||||
if [ ! -n "${BULLETTRAIN_DIR_BG+1}" ]; then
|
if [ ! -n "${BULLETTRAIN_DIR_BG+1}" ]; then
|
||||||
BULLETTRAIN_DIR_BG=blue
|
BULLETTRAIN_DIR_BG=blue
|
||||||
@@ -457,6 +469,13 @@ prompt_ruby() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ELIXIR
|
||||||
|
prompt_elixir() {
|
||||||
|
if command -v elixir > /dev/null 2>&1; then
|
||||||
|
prompt_segment $BULLETTRAIN_ELIXIR_BG $BULLETTRAIN_ELIXIR_FG $BULLETTRAIN_ELIXIR_PREFIX" $(elixir -v | tail -n 1 | awk '{print $2}')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# PERL
|
# PERL
|
||||||
# PLENV: shows current PERL version active in the shell
|
# PLENV: shows current PERL version active in the shell
|
||||||
prompt_perl() {
|
prompt_perl() {
|
||||||
|
|||||||
Reference in New Issue
Block a user