How to show command options only with preceding "-"? #436
-
For now, when I use command I read the discussion here briefly and guess this commit is about my requirement. To clarify, I want the command options only when - is preceding after certain command. May be super helpful if you could share your knowledge. FYI. I'm using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 20 replies
-
I think this behavior has been changed partially by the timeline below. But it is not that consistent. When I use command vim (tab) or git (tab), it shows options, files for the first time when I enters new shell. But when I delete the space before command and re-insert space and press tab then it shows (sub)commands as expected. |
Beta Was this translation helpful? Give feedback.
-
Providing the detailed behavior of the completion settings is not a goal of ble.sh. Instead, ble.sh lets external completion settings to control the behavior.
Yes. Or, more specifically, the descriptions of the options are retrieved from the man pages. The generation of options for completion depends on the setup. With the plain setup without
Could you explain in a bit more detail what is inner command? If you are talking about subcommands like
This behavior is implemented by
It is unrelated. That commit introduced a function that users can programmatically get the list of options. |
Beta Was this translation helpful? Give feedback.
You seem to have hit a bug of Fzf in the specific version you use, 0.48.1. First, I could reproduce the problem without ble.sh with the following bashrc:
Then, I checked the difference in the debug trace produced by
set -x
between Fedora and Arch. It turned out the completion scripts are different. Then, I checked the different versions of fzf. The commit junegunn/fzf@0740ef7 (deployed in 0.48.1) seems to have introduced the bug, and the commit junegunn/fzf@dff8652 (deployed in 0.49.0) seems to have fixed the problem. This is the report upstream: junegunn/fzf#3702.