summaryrefslogtreecommitdiff
path: root/bash/ostree
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2018-05-24 00:08:57 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-24 12:59:49 +0000
commit0d53e5d30940c567ddfa8a7655cc69deaf22df18 (patch)
tree51ad250ece2004fa25d2ae1c9051c091ba724029 /bash/ostree
parent9131d8a4cc28ea498c2ebc058aac73f70d41841c (diff)
downloadostree-0d53e5d30940c567ddfa8a7655cc69deaf22df18.tar.gz
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
Diffstat (limited to 'bash/ostree')
-rw-r--r--bash/ostree2
1 files changed, 2 insertions, 0 deletions
diff --git a/bash/ostree b/bash/ostree
index 218e4254..46baa51b 100644
--- a/bash/ostree
+++ b/bash/ostree
@@ -87,10 +87,12 @@ __ostree_compreply_all_options() {
}
__ostree_compreply_all_files() {
+ compopt -o nospace
COMPREPLY+=( $( compgen -f "$cur" ) )
}
__ostree_compreply_dirs_only() {
+ compopt -o nospace
COMPREPLY+=( $( compgen -d "$cur" ) )
}