Fix some Bash issues

pull/1109/head
Robin Richtsfeld 2017-12-09 15:05:45 +01:00
parent 44455c4a00
commit c86038d61d
3 changed files with 5 additions and 5 deletions

View File

@ -1701,7 +1701,7 @@ _docker_service_tasks() {
} }
_docker_service_update() { _docker_service_update() {
local $subcommand="${words[$subcommand_pos]}" local subcommand="${words[$subcommand_pos]}"
local options_with_args=" local options_with_args="
--constraint --constraint

View File

@ -111,7 +111,7 @@ __vboxmanage_default() {
for WORD in $opts; do for WORD in $opts; do
MATCH=0 MATCH=0
for OPT in ${COMP_WORDS[@]}; do for OPT in "${COMP_WORDS[@]}"; do
# opts=$(echo ${opts} | grep -v $OPT); # opts=$(echo ${opts} | grep -v $OPT);
if [ "$OPT" == "$WORD" ]; then if [ "$OPT" == "$WORD" ]; then
MATCH=1 MATCH=1
@ -219,4 +219,4 @@ _vboxmanage() {
# echo "Got to end withoug completion" # echo "Got to end withoug completion"
} }
complete -F _vboxmanage vboxmanage complete -F _vboxmanage vboxmanage

View File

@ -202,7 +202,7 @@ function git_prompt_vars {
SCM_STATE=${GIT_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN} SCM_STATE=${GIT_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}
if [[ "$(git config --get bash-it.hide-status)" != "1" ]]; then if [[ "$(git config --get bash-it.hide-status)" != "1" ]]; then
[[ "${SCM_GIT_IGNORE_UNTRACKED}" = "true" ]] && local git_status_flags='-uno' [[ "${SCM_GIT_IGNORE_UNTRACKED}" = "true" ]] && local git_status_flags='-uno'
local status_lines=$((git status --porcelain ${git_status_flags} -b 2> /dev/null || local status_lines=$($(git status --porcelain ${git_status_flags} -b 2> /dev/null ||
git status --porcelain ${git_status_flags} 2> /dev/null) | git_status_summary) git status --porcelain ${git_status_flags} 2> /dev/null) | git_status_summary)
local status=$(awk 'NR==1' <<< "$status_lines") local status=$(awk 'NR==1' <<< "$status_lines")
local counts=$(awk 'NR==2' <<< "$status_lines") local counts=$(awk 'NR==2' <<< "$status_lines")
@ -376,7 +376,7 @@ function chruby_version_prompt {
ruby_version=$(ruby --version | awk '{print $1, $2;}') || return ruby_version=$(ruby --version | awk '{print $1, $2;}') || return
if [[ ! $(chruby | grep '*') ]]; then if [[ ! $(chruby | grep '\*') ]]; then
ruby_version="${ruby_version} (system)" ruby_version="${ruby_version} (system)"
fi fi
echo -e "${CHRUBY_THEME_PROMPT_PREFIX}${ruby_version}${CHRUBY_THEME_PROMPT_SUFFIX}" echo -e "${CHRUBY_THEME_PROMPT_PREFIX}${ruby_version}${CHRUBY_THEME_PROMPT_SUFFIX}"