-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlighting completion state #148
Comments
I guess your cwd is The yellow underline is In any case, I like your suggestion of revisiting the command-word highlighting. What possible states need the highlighting distinguish? How about [valid command / invalid command] × [unique completion / ambiguous completion]? All four combinations (valid/unique, valid/ambiguous, invalid/unique, invalid/ambiguous) are possible. "Ambiguous" would mean that there is more than one possible completion, including the word-so-far itself, that is a valid command word (e.g., Does that sounds like a good specification? Does it cover all cases? Are there other variables the command word's highlighting should depend on? For example, the kind of the potential completions (whether they are aliases or functions or external commands, etc)? |
Now tracked as #187. |
path_approx has been removed (see #187). |
5 years later and this still hasn't been implemented yet? I can see this is somewhat true for paths to files/directories (if I'm in It seems like #152 and #244 were attempting to solve it, but has not been merged |
@vegerot Feel free to start a design discussion if you're interested in helping make this happen. Sorry for the late reply. |
@danielshahaf thank you! I don't really know how to go about doing that. |
@vegerot That's not hard. We hold discussions on github (IRC is doable too). Just propose a user-facing behaviour. For example, how should (Don't worry about implementation right now; just about observable behaviour.) |
Cross-referencing #695. |
I'm not quite sure how this is supposed to work, so I'm probably missing some ingenious feature here..
But to me the highlighting on the first word of the command seems a bit random. For example if I type
mplayer
, it stays yellow/underlined until I type ther
, then turns green. When I typepidgin
, it turns red after typing theg
, and then green when the whole word is there. What's that supposed to tell me?My suggestion would be to leave the word white by default, change it to red if it doesn't match anything in the path (i.e. pressing
<tab>
gives you nothing), and green if it's a valid command. Now that we have the yellow color freed up, we can use that to indicate when there is a unique completion already matching our command (telling me I can simply press<tab>
now), and maybe even something else to "warn" me that I typed more than would strictly be necessary for a unique completion)For example,
pidg<tab>
completes to pidgin, sopid
should be white (since it has other possible completions like pidof),pidg
yellow (now I can simply press<tab>
),pidgi
magenta (or whatever, to tell me I wouldn't have had to type that last character) andpidgin
green.The text was updated successfully, but these errors were encountered: