NFC: fix indentation, trim trailing whitespace.
This commit is contained in:
parent
eb1c298f8f
commit
7ee70294ba
16
contrib/ssh
16
contrib/ssh
@ -43,7 +43,7 @@ _ssh()
|
|||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
_known_hosts -a "$optconfigfile"
|
_known_hosts -a "$optconfigfile"
|
||||||
|
|
||||||
[ $COMP_CWORD -eq 1 -o -n "$optconfigfile" ] || \
|
[ $COMP_CWORD -eq 1 -o -n "$optconfigfile" ] || \
|
||||||
@ -86,7 +86,7 @@ _scp()
|
|||||||
-e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
|
-e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Search COMP_WORDS for '-F configfile' argument
|
# Search COMP_WORDS for '-F configfile' argument
|
||||||
set -- "${COMP_WORDS[@]}"
|
set -- "${COMP_WORDS[@]}"
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
@ -103,11 +103,13 @@ _scp()
|
|||||||
done
|
done
|
||||||
|
|
||||||
[[ "$cur" == */* ]] || _known_hosts -c -a "$optconfigfile"
|
[[ "$cur" == */* ]] || _known_hosts -c -a "$optconfigfile"
|
||||||
local IFS=$'\t\n'
|
|
||||||
COMPREPLY=( "${COMPREPLY[@]}" $( command ls -aF1d $cur* \
|
local IFS=$'\t\n'
|
||||||
2>/dev/null | sed \
|
COMPREPLY=( "${COMPREPLY[@]}" $( command ls -aF1d $cur* \
|
||||||
-e "s/[][(){}<>\",:;^&\!$=?\`|\\ ']/\\\\&/g" \
|
2>/dev/null | sed \
|
||||||
-e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
|
-e "s/[][(){}<>\",:;^&\!$=?\`|\\ ']/\\\\&/g" \
|
||||||
|
-e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
complete -F _scp $nospace scp
|
complete -F _scp $nospace scp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user