1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-23 14:20:08 +00:00

avoid conflict with 1-9 alises

This commit is contained in:
Frederick Zhang 2019-10-21 15:50:44 +11:00
parent 557234e352
commit 23f1c44ae2
No known key found for this signature in database
GPG key ID: 980A192C361BE1AE

View file

@ -15,6 +15,7 @@ function _do_sudo() {
command|exec|-) shift; break ;;
nocorrect) shift ;;
noglob) __do_sudo_glob=0; shift ;;
[1-9]) args+=( $1 ); shift ;;
*)
cmd_alias="$(command -v 2>/dev/null -- "$1")"
if [[ "$?" -eq 0 ]] && [[ "$cmd_alias" == 'alias'* ]] && [[ -z "$__do_sudo_expanded["$1"]" ]]; then