completions/duply: Stringify

This used a hardcoded "/bin/ls" for unknown reasons.

For one that's unnecessary, for another we don't want to parse string.

Use globs instead.
This commit is contained in:
Fabian Homborg 2020-04-18 10:29:18 +02:00
parent 6004d04da6
commit 157469038f

View File

@ -1,6 +1,6 @@
# First parameter is the profile name, or 'usage'
complete --command duply --no-files --condition __fish_is_first_token --arguments '(/bin/ls /etc/duply 2>/dev/null) (/bin/ls ~/.duply 2>/dev/null)' -d Profile
complete -c duply -f -n __fish_is_first_token - '(set -l files /etc/duply/* ~/.duply/*; string replace -r ".*/" "" -- $files)' -d Profile
complete --command duply --no-files --arguments usage -d 'Get usage help text'
# Second parameter is a duply command