Skip to content
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

Help: how to scroll completion description left/right #160

Open
EmilyGraceSeville7cf opened this issue Dec 2, 2021 · 5 comments
Open

Help: how to scroll completion description left/right #160

EmilyGraceSeville7cf opened this issue Dec 2, 2021 · 5 comments
Labels
NYI/NewFeat Not yet implemented or New Feature

Comments

@EmilyGraceSeville7cf
Copy link

How to scroll completion description left/right when it's long?

image

@akinomyoga akinomyoga added the NYI/NewFeat Not yet implemented or New Feature label Dec 2, 2021
@akinomyoga
Copy link
Owner

It's just not supported. It's just truncated. Maybe I can add the feature in the future, but I must say the priority is very low. Probably it will not be implemented finally. Nevertheless, the PR is welcome, but I'd say it would require a deep knowledge about the internals of ble.sh.

@akinomyoga
Copy link
Owner

akinomyoga commented Dec 11, 2021

I'm currently thinking that we may provide the menu style preview of the following form:

PROMPT$ command [item6]
 item1  item2  item3  item4  | ----------------- PREVIEW PANEL -----------------
 item5 [item6] item7  item8  | Here long description of "item6" is shown. Lorem 
 item9  item10 item11 item12 | ipsum dolor sit amet, consectetur adipiscing elit
 item13 item14 item15 item16 | , sed do eiusmod tempor incididunt ut labore et d
 item17 item18 item19 item20 | olore magna aliqua. Ut enim ad minim veniam, quis
                             |  nostrud exercitation ullamco laboris nisi ut ali
                             | quip ex ea commodo consequat. Duis aute irure dol
                             | or in reprehenderit in voluptate velit esse cillu
                             | m dolore eu fugiat nulla pariatur. Excepteur sint
                             |  occaecat cupidatat non proident, sunt in culpa q
                             | ui officia deserunt mollit anim id est laborum.

and also the keybinding to toggle the menu styles.

This is technically cleaner, and also I think it is more useful than scrolling left/right by keybindings.

@EmilyGraceSeville7cf
Copy link
Author

LGTM ;)

@EmilyGraceSeville7cf
Copy link
Author

@akinomyoga, according to my first screenshot there are option duplicates like -A on the left. Maybe it's better to put an option just on the first line if it's description is a multi line one?

@akinomyoga
Copy link
Owner

When you reported it two years ago, the duplicates of the options were not removed from the list when the same option appears multiple times on the man page. However, now the duplicates are removed in the latest version.

Though the man page of ksh includes the descriptions of the options of its builtin commands in addition to those of the ksh command itself, it's a different story to handle them. The options should be filtered by the programmable completions the user defines. There needs to be an interface to specify the description in the programmable completion, or otherwise, their descriptions might need to be properly selected from the multiple candidates on the man page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NYI/NewFeat Not yet implemented or New Feature
Projects
None yet
Development

No branches or pull requests

2 participants