bash-completion: Don't add a space after files and directories

Currently if ostree is completing a file or directory for you it adds a
space to the end, but this is an inconvenience when it's an intermediate
directory in a tree. It's better to let the user add the space after the
final directory, so this commit changes the bash completion to avoid
adding a space when completing files or directories.

Closes: #1598
Approved by: jlebon
This commit is contained in:
Matthew Leeds authored and Atomic Bot committed 2018-05-24 12:59:49 +00:00
1 parent 9131d8a4cc
commit 0d53e5d309
1 file changed
+2
+2
View File
@@ -87,10 +87,12 @@ __ostree_compreply_all_options() {
} }
__ostree_compreply_all_files() { __ostree_compreply_all_files() {
compopt -o nospace
COMPREPLY+=( $( compgen -f "$cur" ) ) COMPREPLY+=( $( compgen -f "$cur" ) )
} }
__ostree_compreply_dirs_only() { __ostree_compreply_dirs_only() {
compopt -o nospace
COMPREPLY+=( $( compgen -d "$cur" ) ) COMPREPLY+=( $( compgen -d "$cur" ) )
} }