When the file is being re-created, we write to it, instead of appending to
it. So, the rm here is unnecessary and prevents users from linking the profile
file to another location that is potentially under version control. For
instance, once could link to a profile file located at
"$BASH_IT_CUSTOM/profiles/*.bash_it".
- Replace `echo -e` with `printf` in `_bash-it-log-message()`.
- Local positional parameters to allow for defaults.
- Use `if`/`then` properly.
- Clean up use of `$BASH_IT_LOG_PREFIX` slightly (eliminate duplicate colons).
Alsö, remove impossible alias. If someone wants it, they can write the function, but since aliases literally don't work this way it seems obvious that nobody has ever used it.
* 'master' of https://github.com/Bash-it/bash-it: (22 commits)
main: variable name cleanup
lib/history: new functions `_bash-it-history-auto-*()`
plugin/history*search: no need to load after `plugin/history`
plugin/history-eternal: Use `readonly` instead of `export`
plugin/history: don't use `export`
lib/preview: add full completion
lib/helpers: add `preview` to `bash-it` spaghetti
lib/preview: refactor into a function
completion/system: correctly load version when not linked
main: adopt `_bash-it-log-prefix-by-path()`
main: Glob for *.bash properly when path contains spaces
completion/aliases: rename init function
test/battery: require matching battery identifier
test/battery: add multiple-battery edge case
plugin/battery: split `upower` to two variables
completion/alias: add stub file
completion/alias: fix tests
completion/alias: rename
completion/alias: `shfmt` && `shellcheck`
completion/alias: eliminate use of `eval`
...
Two new functions `_bash-it-history-auto-save()` and `_bash-it-history-auto-load()`, which append new history to disk and load new history from disk, respectively.
See bash-it/bash-it#1595 for discussion.
...and hide errors relating to setting already-readonly variables.
`plugin/history-eternal` does not need to force loading after `plugin/history` because both plugins will play nicely with read-only variables, and since we're overwritting and marking read-only then the intended result survives no matter which loads first.
plugin/history-eternal: require Bash v4.3+
Unlimited history is only possible in _Bash_ version 4.3 and up
This allows future use like `bash-it preview`. Alsö, allows to use `$BASH_PREVIEW` to specify a particular theme to preview instead of just doing all of them.
- `shfmt`, `shellcheck`
- Clean up legacy/compatibility code to simpler control flow
- Move theme stuff down to where themes are handled
- Don't use `**` as _Bash It_ has never before set `globstar`; this eliminates varying behavior by environment; this alsö fixes users having any not-enabled themes under their custom dir.
- Lose weird Mac-specific alternate shell startup file (Bash loads startup files on Mac the same as it does on any other *nix system.)
- Place `composure.sh` init all in one place
- remove 10-years-deprecated backwards compatibility: Deprecated in `b59ee658f78ec6ff8c6c2754216e0322b7fe18e2` dated 2011-10-29.