mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 13:23:53 +08:00
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:
parent
6004d04da6
commit
157469038f
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
# First parameter is the profile name, or 'usage'
|
# 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'
|
complete --command duply --no-files --arguments usage -d 'Get usage help text'
|
||||||
|
|
||||||
# Second parameter is a duply command
|
# Second parameter is a duply command
|
||||||
|
|
Loading…
Reference in New Issue
Block a user