Remove trailing whitespace

Remove all trailing whitespace since that is not needed anyway.
This commit is contained in:
Martin Ueding 2012-07-21 19:24:40 +02:00 committed by Ville Skyttä
parent 3aa040d25f
commit 3f9fe7a853

View File

@ -184,7 +184,7 @@ _upvar()
# Assign variables one scope above the caller # Assign variables one scope above the caller
# Usage: local varname [varname ...] && # Usage: local varname [varname ...] &&
# _upvars [-v varname value] | [-aN varname [value ...]] ... # _upvars [-v varname value] | [-aN varname [value ...]] ...
# Available OPTIONS: # Available OPTIONS:
# -aN Assign next N values to varname as array # -aN Assign next N values to varname as array
@ -208,7 +208,7 @@ _upvars()
"${FUNCNAME[0]}: \`$1': invalid number specifier" 1>&2 "${FUNCNAME[0]}: \`$1': invalid number specifier" 1>&2
return 1; } return 1; }
# Assign array of -aN elements # Assign array of -aN elements
[[ "$2" ]] && unset -v "$2" && eval $2=\(\"\${@:3:${1#-a}}\"\) && [[ "$2" ]] && unset -v "$2" && eval $2=\(\"\${@:3:${1#-a}}\"\) &&
shift $((${1#-a} + 2)) || { echo "bash: ${FUNCNAME[0]}:"\ shift $((${1#-a} + 2)) || { echo "bash: ${FUNCNAME[0]}:"\
"\`$1${2+ }$2': missing argument(s)" 1>&2; return 1; } "\`$1${2+ }$2': missing argument(s)" 1>&2; return 1; }
;; ;;
@ -244,7 +244,7 @@ __reassemble_comp_words_by_ref()
# Exclude only those characters, which were really included # Exclude only those characters, which were really included
exclude="${1//[^$COMP_WORDBREAKS]}" exclude="${1//[^$COMP_WORDBREAKS]}"
fi fi
# Default to cword unchanged # Default to cword unchanged
eval $3=$COMP_CWORD eval $3=$COMP_CWORD
# Are characters excluded which were former included? # Are characters excluded which were former included?
@ -355,7 +355,7 @@ __get_cword_at_cursor_by_ref()
# cword Return cword via $cword # cword Return cword via $cword
# #
# Available OPTIONS: # Available OPTIONS:
# -n EXCLUDE Characters out of $COMP_WORDBREAKS which should NOT be # -n EXCLUDE Characters out of $COMP_WORDBREAKS which should NOT be
# considered word breaks. This is useful for things like scp # considered word breaks. This is useful for things like scp
# where we want to return host:path and not only path, so we # where we want to return host:path and not only path, so we
# would pass the colon (:) as -n option in this case. # would pass the colon (:) as -n option in this case.
@ -383,7 +383,7 @@ _get_comp_words_by_ref()
w) vwords=$OPTARG ;; w) vwords=$OPTARG ;;
esac esac
done done
while [[ $# -ge $OPTIND ]]; do while [[ $# -ge $OPTIND ]]; do
case ${!OPTIND} in case ${!OPTIND} in
cur) vcur=cur ;; cur) vcur=cur ;;
prev) vprev=prev ;; prev) vprev=prev ;;
@ -399,7 +399,7 @@ _get_comp_words_by_ref()
[[ $vcur ]] && { upvars+=("$vcur" ); upargs+=(-v $vcur "$cur" ); } [[ $vcur ]] && { upvars+=("$vcur" ); upargs+=(-v $vcur "$cur" ); }
[[ $vcword ]] && { upvars+=("$vcword"); upargs+=(-v $vcword "$cword"); } [[ $vcword ]] && { upvars+=("$vcword"); upargs+=(-v $vcword "$cword"); }
[[ $vprev && $cword -ge 1 ]] && { upvars+=("$vprev" ); upargs+=(-v $vprev [[ $vprev && $cword -ge 1 ]] && { upvars+=("$vprev" ); upargs+=(-v $vprev
"${words[cword - 1]}"); } "${words[cword - 1]}"); }
[[ $vwords ]] && { upvars+=("$vwords"); upargs+=(-a${#words[@]} $vwords [[ $vwords ]] && { upvars+=("$vwords"); upargs+=(-a${#words[@]} $vwords
"${words[@]}"); } "${words[@]}"); }
@ -479,7 +479,7 @@ _get_cword()
# @deprecated Use `_get_comp_words_by_ref cur prev' instead # @deprecated Use `_get_comp_words_by_ref cur prev' instead
# @see _get_comp_words_by_ref() # @see _get_comp_words_by_ref()
# #
_get_pword() _get_pword()
{ {
if [[ $COMP_CWORD -ge 1 ]]; then if [[ $COMP_CWORD -ge 1 ]]; then
_get_cword "${@:-}" 1 _get_cword "${@:-}" 1
@ -617,7 +617,7 @@ _split_longopt()
} }
# Complete variables. # Complete variables.
# @return True (0) if variables were completed, # @return True (0) if variables were completed,
# False (> 0) if not. # False (> 0) if not.
_variables() _variables()
{ {
@ -642,7 +642,7 @@ _variables()
# -o XSPEC Passed to _filedir as first arg for other output redirections # -o XSPEC Passed to _filedir as first arg for other output redirections
# -i XSPEC Passed to _filedir as first arg for stdin redirections # -i XSPEC Passed to _filedir as first arg for stdin redirections
# -s Split long options with _split_longopt, implies -n = # -s Split long options with _split_longopt, implies -n =
# @return True (0) if completion needs further processing, # @return True (0) if completion needs further processing,
# False (> 0) no further processing is necessary. # False (> 0) no further processing is necessary.
# #
_init_completion() _init_completion()
@ -914,7 +914,7 @@ _ncpus()
} }
# Perform tilde (~) completion # Perform tilde (~) completion
# @return True (0) if completion needs further processing, # @return True (0) if completion needs further processing,
# False (> 0) if tilde is followed by a valid username, completions # False (> 0) if tilde is followed by a valid username, completions
# are put in COMPREPLY and no further processing is necessary. # are put in COMPREPLY and no further processing is necessary.
_tilde() _tilde()
@ -951,7 +951,7 @@ _tilde()
# ~foo/$HOME /home/foo/$HOME # ~foo/$HOME /home/foo/$HOME
# ~foo/a b /home/foo/a b # ~foo/a b /home/foo/a b
# ~foo/* /home/foo/* # ~foo/* /home/foo/*
# #
# @param $1 Name of variable (not the value of the variable) to expand # @param $1 Name of variable (not the value of the variable) to expand
__expand_tilde_by_ref() __expand_tilde_by_ref()
{ {
@ -966,7 +966,7 @@ __expand_tilde_by_ref()
# becomes "b". Single quotes prevent eval. # becomes "b". Single quotes prevent eval.
# +-----1----+ +---2----+ # +-----1----+ +---2----+
eval $1="${!1/%\/*}"/'${!1#*/}' eval $1="${!1/%\/*}"/'${!1#*/}'
else else
# No, $1 doesn't contain slash # No, $1 doesn't contain slash
eval $1="${!1}" eval $1="${!1}"
fi fi