-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
Additions to the InputSelector (resolving #4226) #4227
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a77bb47
First step towards implementing #4226.
5974746
Added InputSelector config options.
1da48d1
Format + fix to prepare for PR to resolve #4226.
dec93d8
Accept renaming suggestion.
Danielkonge 68d2f2c
Accept suggestion about pop().
Danielkonge a35b3e6
Fix typo.
Danielkonge 7fe0fba
Tried fixing stuff from the feedback.
7c2fdc2
Fixed typo.
b441be6
Fixed small mistake in docs.
3206a41
Small fix for label computation.
38f0896
Allow uppercase alphabet + add fuzzy_description.
c8b891e
Merge branch 'wez:main' into main
Danielkonge e19d7da
Minor cleanup.
bfde7e1
Merge branch 'wez:main' into main
Danielkonge 7bc1bda
Use more standard alphabet (without j/k).
0906e55
Fixed docs after previous commit.
b75daa6
Added key assignments to docs.
30403fd
Merge branch 'wez:main' into main
Danielkonge 90d0279
Apply suggestions from code review (2 remaining)
Danielkonge 18ae512
Updated arcording to feedback (added tests).
ea7e7c8
Update docs (1 thing left to do)
Danielkonge 93d509c
Added version details to the key table.
b249efc
Merge branch 'wez:main' into main
Danielkonge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, very nice PR 👌
I think the word
description
isn't a great here, andprompt
would better fitWdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could go through the code and docs and change it, but I am not sure prompt would be a good idea. I would like to keep the naming similar to what you see in PromptInputLine (see https://wezfurlong.org/wezterm/config/lua/keyassignment/PromptInputLine.html ) and at the same time avoid confusion with this overlay.
Of course, we could change
description
toprompt
in PromptInputLine too. What do you think @wez?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think description is fine; prompt doesn't feel like quite the right word anyway, and this is consistent with promptinputline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 huh? My understanding of these words:
description
for me is a text that describes something, can be long, and doesn't ask for any actionprompt
for me is the text just before a text field input, it's a 'call-to-action' (e.g. ends with a:
)And from where I see
description
&fuzzy_description
being used in the code,prompt
matches more thandescription
.Or maybe I'm missing some meaning of the english language? (I'm not english native)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think description can be used to describe pretty much anything; also something asking for an action. In this case
description
can be used to describe either what your current InputSelector does, what different keys do or really anything else that you think helps you when using the InputSelector, which I think is better than prompt (it is better to be a bit more general, since it has different use cases).The way
description
is currently used in the code is not the only way to use it, it is just what I had in mind for myself.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I see how
description
is more generic here, but it definitely feels weird to me to have what I see as the prompt in adescription
field.For the different use cases I'd use a separate options: one for the prompt and one for the description, if any.
👉 This is what
fzf
does for example, where both the prompt (namedprompt
) and the description (namedheader
) exist.And since they are separate the layout can be changed so that for example the header is displayed before the prompt line or after (but before the items to select)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prompt
is a compatible word, it just feels a bit more "active" or stronger than I think is necessary here. If I hadn't used description elsewhere I'd be more into it here, but as it stands: I don't have sufficiently strong feelings about it to actively want to change it