diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-03-31 20:10:08 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-03-31 20:10:08 +0100 |
commit | 3ef734ca72b7886a26a06d6b90381110864a1d42 (patch) | |
tree | e62cfc95c7b3085509fc426c76bbb601fb71c062 /Completion/Unix/Command/_ip | |
parent | f1c702f2a4159409b27b9576999614a69a51987d (diff) | |
download | zsh-3ef734ca72b7886a26a06d6b90381110864a1d42.tar.gz zsh-3ef734ca72b7886a26a06d6b90381110864a1d42.tar.xz zsh-3ef734ca72b7886a26a06d6b90381110864a1d42.zip |
users/20058: improve device completion in ip completion.
We were too eager to regard strings already on the command line as possible devices.
Diffstat (limited to 'Completion/Unix/Command/_ip')
-rw-r--r-- | Completion/Unix/Command/_ip | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_ip b/Completion/Unix/Command/_ip index 3b68c358d..bfa7d995b 100644 --- a/Completion/Unix/Command/_ip +++ b/Completion/Unix/Command/_ip @@ -8,8 +8,11 @@ # # Values encoding simple types # -local -a subcmd_dev -subcmd_dev=(/$'[[:alnum:][:punct:][:cntrl:][:digit:]]##\0'/ ':interfaces:network interface:_net_interfaces') +local -a subcmd_dev net_intf_disp net_intf_list +# subcmd_dev=(/$'[[:alnum:][:punct:][:cntrl:][:digit:]]##\0'/ ':interfaces:network interface:_net_interfaces') +_find_net_interfaces +subcmd_dev=(/"(${(j.|.)net_intf_list})"$'\0'/ + ':interfaces:network interface:_net_interfaces') local -a subcmd_onoff subcmd_onoff=(/$'(on|off)\0'/ ':onoff:state (on or off):(on off)') |