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 | 34817: Catch some errors earlier when reading history. (diff) | |
| download | zsh-3ef734ca72b7886a26a06d6b90381110864a1d42.tar zsh-3ef734ca72b7886a26a06d6b90381110864a1d42.tar.gz zsh-3ef734ca72b7886a26a06d6b90381110864a1d42.tar.bz2 zsh-3ef734ca72b7886a26a06d6b90381110864a1d42.tar.lz zsh-3ef734ca72b7886a26a06d6b90381110864a1d42.tar.xz zsh-3ef734ca72b7886a26a06d6b90381110864a1d42.tar.zst 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)') |
