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:
parent
dfc8796b25
commit
9569cfc8f3
@ -54,7 +54,7 @@ _hledger_completion_function() {
|
|||||||
|
|
||||||
# Completion lists are already sorted at build-time
|
# Completion lists are already sorted at build-time
|
||||||
# This keeps commands and options grouped separately
|
# This keeps commands and options grouped separately
|
||||||
compopt -o nosort
|
compopt -o nosort +o filenames
|
||||||
_hledger_compreply "$(_hledger_compgen "$_hledger_complist_commands")"
|
_hledger_compreply "$(_hledger_compgen "$_hledger_complist_commands")"
|
||||||
_hledger_compreply_append "$(_hledger_compgen "$_hledger_complist_generic_options")"
|
_hledger_compreply_append "$(_hledger_compgen "$_hledger_complist_generic_options")"
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ _hledger_completion_function() {
|
|||||||
|
|
||||||
# Completion lists are already sorted at build-time
|
# Completion lists are already sorted at build-time
|
||||||
# This keeps commands and options grouped separately
|
# This keeps commands and options grouped separately
|
||||||
compopt -o nosort
|
compopt -o nosort +o filenames
|
||||||
_hledger_compreply "$(_hledger_compgen "$_hledger_complist_commands")"
|
_hledger_compreply "$(_hledger_compgen "$_hledger_complist_commands")"
|
||||||
_hledger_compreply_append "$(_hledger_compgen "$_hledger_complist_generic_options")"
|
_hledger_compreply_append "$(_hledger_compgen "$_hledger_complist_generic_options")"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user