completions/path: Add --reverse

This commit is contained in:
Fabian Homborg 2022-05-29 20:36:11 +02:00
parent 4612343d6e
commit e6136f08fb

View File

@ -25,6 +25,7 @@ complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sort" \
-l key -x -a 'basename\t"Sort only by basename" dirname\t"Sort only by dirname" path\t"Sort by full path"'
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sort" -s u -l unique -d 'Only leave the first of each run with the same key'
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sort" -s r -l reverse -d 'Reverse the order'
# Turn on file completions again.
# match takes a glob as first arg, expand takes only globs.