commit
3f839d5ac2
|
|
@ -154,11 +154,11 @@ For custom scripts, and aliases, just create the following files (they'll be ign
|
||||||
|
|
||||||
Anything in the custom directory will be ignored, with the exception of `custom/example.bash`.
|
Anything in the custom directory will be ignored, with the exception of `custom/example.bash`.
|
||||||
|
|
||||||
Alternately, if you would like to keep your custom scripts under version control, you can set `BASH_IT_CUSTOM` in your `~/.bashrc` to another location outside of the `~/.bash_it` folder. In this case, any `*.bash` file under every directory below `BASH_IT_CUSTOM` folder will be used.
|
Alternately, if you would like to keep your custom scripts under version control, you can set `BASH_IT_CUSTOM` in your `~/.bashrc` to another location outside of the `$BASH_IT` folder. In this case, any `*.bash` file under every directory below `BASH_IT_CUSTOM` folder will be used.
|
||||||
|
|
||||||
## Themes
|
## Themes
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
|
|
@ -195,7 +195,7 @@ This will restore your previous Bash profile. After the uninstall script finishe
|
||||||
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.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
### Prompt Version Control Check
|
### Prompt Version Control Check
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ draft ()
|
||||||
cmd=$(eval "history | grep '^[[:blank:]]*$num' | head -1" | sed 's/^[[:blank:][:digit:]]*//')
|
cmd=$(eval "history | grep '^[[:blank:]]*$num' | head -1" | sed 's/^[[:blank:][:digit:]]*//')
|
||||||
fi
|
fi
|
||||||
eval "$func() { $cmd; }"
|
eval "$func() { $cmd; }"
|
||||||
typeset file=$(mktemp /tmp/draft.XXXX)
|
typeset file=$(mktemp -t draft.XXXX)
|
||||||
typeset -f $func > $file
|
typeset -f $func > $file
|
||||||
transcribe $func $file draft
|
transcribe $func $file draft
|
||||||
rm $file 2>/dev/null
|
rm $file 2>/dev/null
|
||||||
|
|
@ -300,7 +300,7 @@ revise ()
|
||||||
group composure
|
group composure
|
||||||
|
|
||||||
typeset func=$1
|
typeset func=$1
|
||||||
typeset temp=$(mktemp /tmp/revise.XXXX)
|
typeset temp=$(mktemp -t revise.XXXX)
|
||||||
|
|
||||||
if [ -z "$func" ]; then
|
if [ -z "$func" ]; then
|
||||||
printf '%s\n' 'missing parameter(s)'
|
printf '%s\n' 'missing parameter(s)'
|
||||||
|
|
|
||||||
|
|
@ -500,7 +500,7 @@ _help-plugins()
|
||||||
|
|
||||||
# display a brief progress message...
|
# display a brief progress message...
|
||||||
printf '%s' 'please wait, building help...'
|
printf '%s' 'please wait, building help...'
|
||||||
typeset grouplist=$(mktemp /tmp/grouplist.XXXXXX)
|
typeset grouplist=$(mktemp -t grouplist.XXXXXX)
|
||||||
typeset func
|
typeset func
|
||||||
for func in $(typeset_functions)
|
for func in $(typeset_functions)
|
||||||
do
|
do
|
||||||
|
|
@ -547,7 +547,7 @@ all_groups ()
|
||||||
group 'lib'
|
group 'lib'
|
||||||
|
|
||||||
typeset func
|
typeset func
|
||||||
typeset file=$(mktemp /tmp/composure.XXXX)
|
typeset file=$(mktemp -t composure.XXXX)
|
||||||
for func in $(typeset_functions)
|
for func in $(typeset_functions)
|
||||||
do
|
do
|
||||||
typeset -f $func | metafor group >> $file
|
typeset -f $func | metafor group >> $file
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,7 @@ function alias_completion {
|
||||||
(( ${#completions[@]} == 0 )) && return 0
|
(( ${#completions[@]} == 0 )) && return 0
|
||||||
|
|
||||||
# create temporary file for wrapper functions and completions
|
# create temporary file for wrapper functions and completions
|
||||||
rm -f "/tmp/${namespace}-*.tmp" # preliminary cleanup
|
local tmp_file; tmp_file="$(mktemp -t "${namespace}-${RANDOM}XXX.tmp")" || return 1
|
||||||
local tmp_file; tmp_file="$(mktemp "/tmp/${namespace}-${RANDOM}XXX.tmp")" || return 1
|
|
||||||
|
|
||||||
local completion_loader; completion_loader="$(complete -p -D 2>/dev/null | sed -Ene 's/.* -F ([^ ]*).*/\1/p')"
|
local completion_loader; completion_loader="$(complete -p -D 2>/dev/null | sed -Ene 's/.* -F ([^ ]*).*/\1/p')"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue