Closed EmilyGraceSeville7cf closed 1 year ago
Thank you for the report! But what filters out short options is bash-completion
. With the plain ble.sh without bash-completion
, the menu shows short options at least in my environment, but it doesn't show them with bash-completion
.
As a sidenote, I almost always use long options. But having short ones can be beneficial for some users to learn them ones via completion and quickly type later. What about to provide some BLE setting whether to show both kind of options or particular one?
BLE itself (without bash-completion) currently shows both, so are you suggesting an option to disable short options? Maybe I can add an option to ignore completions by a glob pattern.
Or if your suggestion is an option to modify the behavior of bash-completion, I don't think that option should be implemented in ble.sh. I'm thinking of suggesting an option to bash-completion, but the reasoning given in https://github.com/scop/bash-completion/issues/831 also seems to make sense. How many users want to find short options when they do not know about the option (given that no descriptions are shown in the plain Bash without ble.sh)? I personally feel it's worth showing, but it's merely my preference. I'll think about it more.
BLE itself (without bash-completion) currently shows both, so are you suggesting an option to disable short options?
Yes.
BLE itself (without bash-completion) currently shows both, so are you suggesting an option to disable short options?
Yes.
I initially thought about adding a general bleopt
option that specifies a pattern for the completion candidates that should be ignored in a similar way as FIGNORE
so that the user can specify -?
in the bleopt
option. However, this will disable all the short option completions. On the other hand, the behavior of bash-completion is more specific: if there is a corresponding long option to a short option, the short option is not generated. Then, I'm not sure if it's worth implementing a bleopt option for this specific behavior.
For example, do you really need it? The filtering of short options is already implemented in bash-completion, so if you wouldn't like to see the short options, you can just load bash-completion. Actually, the initial request seems to be the opposite, and it seems like you have just suggested the same feature as bash-completion after looking at https://github.com/scop/bash-completion/issues/831. In that case, there is no reason to implement it in ble.sh.
So... even if it's gonna be implemented, it will be done in bash-completion? Then... is it worth to close this issue?
So... even if it's gonna be implemented, it will be done in bash-completion?
Which feature are you talking about? The feature that turns off the short options are already implemented in bash-completion.
To summarize, in this issue, two opposite features are discussed.
ble.sh
or create a fork of bash-completion (like blesh-completion).ble.sh
. However, I do not see them for now.In both cases, if there arise strong reasons that convince me, I'll consider implementing it in ble.sh
, but currently it appears to be unlikely to me. If you currently do not have strong reasons that could convince me, you can close the issue for now. If you find them later, you can reopen it.
ble version: 0.4.0-devel4+f4c973b Bash version: 5.1.16(1)-release (x86_64-pc-linux-gnu)
Maybe add them into completion suggestions manually or send request to change man page format slightly to make it parsable? 🤔 Or enhance parser itself.