Style: unset compopt filenames if completing command or option

This is about the looks of the completion list -- if we have a
directory with the name of a subcommand it will be presented with
a trailing slash. This avoids that.
This commit is contained in:
Vladimir Zhelezov 2020-12-10 06:49:22 +01:00
parent dfc8796b25
commit 9569cfc8f3
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ _hledger_completion_function() {
# Completion lists are already sorted at build-time
# This keeps commands and options grouped separately
compopt -o nosort
compopt -o nosort +o filenames
_hledger_compreply "$(_hledger_compgen "$_hledger_complist_commands")"
_hledger_compreply_append "$(_hledger_compgen "$_hledger_complist_generic_options")"

View File

@ -54,7 +54,7 @@ _hledger_completion_function() {
# Completion lists are already sorted at build-time
# This keeps commands and options grouped separately
compopt -o nosort
compopt -o nosort +o filenames
_hledger_compreply "$(_hledger_compgen "$_hledger_complist_commands")"
_hledger_compreply_append "$(_hledger_compgen "$_hledger_complist_generic_options")"