summaryrefslogtreecommitdiffstats
path: root/bash-completion/fsck.cramfs
diff options
context:
space:
mode:
authorSami Kerola2016-03-13 11:31:45 +0100
committerKarel Zak2016-03-14 13:15:13 +0100
commit5f57e1420c425da514eb4f4c32c8185442d029c3 (patch)
tree08898239bd0d08a8feb6904de8e8da08e736cdb8 /bash-completion/fsck.cramfs
parentsetsid: fix argument count bug (diff)
downloadkernel-qcow2-util-linux-5f57e1420c425da514eb4f4c32c8185442d029c3.tar.gz
kernel-qcow2-util-linux-5f57e1420c425da514eb4f4c32c8185442d029c3.tar.xz
kernel-qcow2-util-linux-5f57e1420c425da514eb4f4c32c8185442d029c3.zip
bash-completion: fsck.cramfs, isosize: find files an argument
Earlier completion suggested only options for the command, this changes options to be proposed when first character of an argument is dash. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'bash-completion/fsck.cramfs')
-rw-r--r--bash-completion/fsck.cramfs11
1 files changed, 9 insertions, 2 deletions
diff --git a/bash-completion/fsck.cramfs b/bash-completion/fsck.cramfs
index acf656411..b3276b974 100644
--- a/bash-completion/fsck.cramfs
+++ b/bash-completion/fsck.cramfs
@@ -15,8 +15,15 @@ _fsck.cramfs_module()
return 0
;;
esac
- OPTS='--verbose --destination --help --version file'
- COMPREPLY=( $(compgen -W "${OPTS[*]}" -S ' ' -- $cur) )
+ case $cur in
+ -*)
+ COMPREPLY=( $(compgen -W "--verbose --blocksize --extract --help --version" -- $cur) )
+ return 0
+ ;;
+ esac
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
return 0
}
complete -F _fsck.cramfs_module fsck.cramfs