Closed deployable closed 7 years ago
Regarding the arbitrary length shortcuts - this was the first implementation I had however i changed to lists the options to better replicate behaviour of iproute2 see http://www.policyrouting.org/iproute2.doc.html and Abbervations
I think we should do our best to replicate iproute2 cli.. what do you think?
Agreed, the iproute2 cli does support arbitrary length abbreviations in the code though.
In the code all commands are listed in their full form and then the matches
function performs the comparison on the characters the user provides in argv which this PR is emulating. I guess the the documentation only lists a subset of abbreviations for for brevity :)??
For some reason I've got into the habit of using 2 letters for most ip
commands on linux, which generally fail in the script.
PR Merged, thank you for the contribution. You will be listed in AUTHORS file.
Cheers. Thank you for the script!
Just released v1.2.1 and PR submitted to homebrew-core
Adds support for arbitrary length command shortcuts.
iproute2 uses a
matches
function for it's command processing which looks equivelent to using string.startswith()
.Command order has also been matched to iproute2 as the shortcuts depend on order.
Fixes #14