More complete shell completions for borg mount -o

This commit is contained in:
SanskritFritz 2019-02-10 20:25:39 +01:00
parent 8435206cc3
commit 7becc03608
2 changed files with 4 additions and 4 deletions

View File

@ -57,8 +57,8 @@ _borg()
return 0
;;
'-o')
# FIXME there are lot more options, but not all are applicable:
local fuse_options="allow_other allow_root versions allow_damaged_files"
# FIXME This list is probably not full, but I tried to pick only those that are relevant to borg mount -o:
local fuse_options="ac_attr_timeout= allow_damaged_files allow_other allow_root attr_timeout= auto auto_cache auto_unmount default_permissions entry_timeout= gid= group_id= kernel_cache max_read= negative_timeout= noauto noforget remember= remount rootmode= uid= umask= user user_id= versions"
COMPREPLY=( $(compgen -W "${fuse_options}" -- ${cur}) )
return 0
;;

View File

@ -235,8 +235,8 @@ complete -c borg -f -l 'last' -d 'Only last N archives'
# borg mount options
complete -c borg -f -s f -l 'foreground' -d 'Stay in foreground, do not daemonize' -n "__fish_seen_subcommand_from mount"
# FIXME there are lot more options, but not all are applicable:
set -l fuse_options "allow_other allow_root versions allow_damaged_files uid gid umask"
# FIXME This list is probably not full, but I tried to pick only those that are relevant to borg mount -o:
set -l fuse_options "ac_attr_timeout= allow_damaged_files allow_other allow_root attr_timeout= auto auto_cache auto_unmount default_permissions entry_timeout= gid= group_id= kernel_cache max_read= negative_timeout= noauto noforget remember= remount rootmode= uid= umask= user user_id= versions"
complete -c borg -f -s o -d 'Fuse mount OPTION' -a "$fuse_options" -n "__fish_seen_subcommand_from mount"
# Archive filters
complete -c borg -f -s P -l 'prefix' -d 'Only archive names starting with PREFIX' -n "__fish_seen_subcommand_from mount"