mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
oh-my-bash: Fix coding style
This commit is contained in:
@ -87,7 +87,7 @@ function _omb_module_require {
|
||||
status=127
|
||||
done
|
||||
|
||||
if ((status==0)); then
|
||||
if ((status == 0)); then
|
||||
local i
|
||||
for i in "${!files[@]}"; do
|
||||
local path=${files[i]} module=${modules[i]}
|
||||
@ -117,11 +117,11 @@ _omb_module_require_lib "${_omb_init_files[@]}"
|
||||
unset -v _omb_init_files
|
||||
|
||||
# Figure out the SHORT hostname
|
||||
if [[ "$OSTYPE" = darwin* ]]; then
|
||||
if [[ $OSTYPE = darwin* ]]; then
|
||||
# macOS's $HOST changes with dhcp, etc. Use ComputerName if possible.
|
||||
SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*/}
|
||||
SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*}
|
||||
else
|
||||
SHORT_HOST=${HOST/.*/}
|
||||
SHORT_HOST=${HOST/.*}
|
||||
fi
|
||||
|
||||
# Load all of the plugins that were defined in ~/.bashrc
|
||||
@ -158,13 +158,18 @@ elif [[ $OSH_THEME ]]; then
|
||||
fi
|
||||
|
||||
if [[ $PROMPT ]]; then
|
||||
export PS1="\["$PROMPT"\]"
|
||||
export PS1='\['$PROMPT'\]'
|
||||
fi
|
||||
|
||||
if ! _omb_util_command_exists '__git_ps1' ; then
|
||||
if ! _omb_util_command_exists '__git_ps1'; then
|
||||
source "$OSH/tools/git-prompt.sh"
|
||||
fi
|
||||
|
||||
# Adding Support for other OSes
|
||||
[ -s /usr/bin/gloobus-preview ] && PREVIEW="gloobus-preview" ||
|
||||
[ -s /Applications/Preview.app ] && PREVIEW="/Applications/Preview.app" || PREVIEW="less"
|
||||
if [[ -s /usr/bin/gloobus-preview ]]; then
|
||||
PREVIEW="gloobus-preview"
|
||||
elif [[ -s /Applications/Preview.app ]]; then
|
||||
PREVIEW="/Applications/Preview.app"
|
||||
else
|
||||
PREVIEW="less"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user