mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
* OMB - Major Refactor - Aliases and completions now works like plugins (need to enabled in .bashrc) - Removed the compatible check in spectrum.sh, OMB now works with Bash v3.x like the old days. - Removed core plugin, added those bash functions into base.sh and load during startup. - Updated OSH template for new installations - Added history config and few other stuff from #17 @TODO: Added a shell script to update old version of .bashrc to new one. * Fixed ShellCheck issues * Fixed ShellCheck issues
28 lines
816 B
Bash
28 lines
816 B
Bash
#!/usr/bin/env bash
|
|
|
|
# Loads the system's Bash completion modules.
|
|
# If Homebrew is installed (OS X), its Bash completion modules are loaded.
|
|
|
|
if [ -f /etc/bash_completion ]; then
|
|
. /etc/bash_completion
|
|
fi
|
|
|
|
# Some distribution makes use of a profile.d script to import completion.
|
|
if [ -f /etc/profile.d/bash_completion.sh ]; then
|
|
. /etc/profile.d/bash_completion.sh
|
|
fi
|
|
|
|
|
|
if [ $(uname) = "Darwin" ] && command -v brew &>/dev/null ; then
|
|
BREW_PREFIX=$(brew --prefix)
|
|
|
|
if [ -f "$BREW_PREFIX"/etc/bash_completion ]; then
|
|
. "$BREW_PREFIX"/etc/bash_completion
|
|
fi
|
|
|
|
# homebrew/versions/bash-completion2 (required for projects.completion.bash) is installed to this path
|
|
if [ -f "$BREW_PREFIX"/share/bash-completion/bash_completion ]; then
|
|
. "$BREW_PREFIX"/share/bash-completion/bash_completion
|
|
fi
|
|
fi
|