]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - bash-completion/isosize
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / isosize
index 13d4d298a7e3fa6cfec604afef9f9a2aebf9007c..fec2f8b8f461bc0ef83b602edad54abf0e343173 100644 (file)
@@ -13,8 +13,15 @@ _isosize_module()
                        return 0
                        ;;
        esac
-       OPTS='--divisor --sectors --help --version'
-       COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+       case $cur in
+               -*)
+                       COMPREPLY=( $(compgen -W "--divisor --sectors --help --version" -- $cur) )
+                       return 0
+                       ;;
+       esac
+       local IFS=$'\n'
+       compopt -o filenames
+       COMPREPLY=( $(compgen -f -- $cur) )
        return 0
 }
 complete -F _isosize_module isosize