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

suggest more that 1 and categorise autosuggestions; much like vimperator and friends, and let user define priority #1465

Closed
257 opened this issue May 14, 2014 · 22 comments

Comments

@257
Copy link

257 commented May 14, 2014

with this, autosuggestion doesn't just offer one single/best suggestion but rather give a list of suggestions pulled from different sources, very much like the way vimperator/pentadactyl/dwb do it. Tab obviously would cycle through suggestions.
moreover make it configureable so the user can decide which category has a higher priority.

@ridiculousfish
Copy link
Member

Can you please add some mockups of what this might look like, and/or screenshots of similar apps for inspiration?

@257
Copy link
Author

257 commented May 15, 2014

On Thu, May 15, 2014 at 02:01:38AM -0700, ridiculousfish wrote:

Can you please add some mockups of what this might look like, and/or
screenshots of similar apps for inspiration?

i'm attaching the screenshots to this via email, hoping github will
handle it.

@257
Copy link
Author

257 commented May 15, 2014

those are from pentadactyl addon for firefox.
pentadactyl is a fork of vimperator.

@257
Copy link
Author

257 commented May 15, 2014

email didn't work, trying here via github's web interface.
ocw_confirmed_after_space

ocw_picked_with_tab

ocws_argument_is_queried_from_history_of_ocw

suggestions_4o_categorised

tabbing_through_categories

@257
Copy link
Author

257 commented May 26, 2014

please let me know if you need more info.

@ridiculousfish
Copy link
Member

I guess I just don't get it. Where did the command line go in the above screenshots? How would the user invoke it?

@257
Copy link
Author

257 commented May 26, 2014

commandline is at the bottom of the screen.
user wiould invoke it by 'o' for ':open'.
category borders are in pink, so you have 'Search completion' and 'Smart completion' for example.
yellow bar is what user picks up from offered suggestion by using the Tab key.

@257
Copy link
Author

257 commented May 26, 2014

i think best would be try to pentadactyl with firefox:
http://5digits.org/pentadactyl/

if you're on linux then there is a bunch of browsers that do this natively:
dwb, jumanji, luakit, uzbl and vimprobable2 to name a few.

@ridiculousfish
Copy link
Member

Those look cool, but the UI of a browser is necessarily different from that of a command line app, and I'm still not quite getting how the UI would work in fish. For example, you suggest typing 'o' to invoke this mode, but normally 'o' just inserts the letter o. So how would you insert an 'o'?

@257
Copy link
Author

257 commented May 27, 2014

-- one way of doing it --

there is a menu of possible completions (mpc? [1]) that comes with Tab already
why don't we use that. it would have to be invoke on autosuggestions though,
partitioned into categories just like the examples above. so user would starting
typing commands as before but this time not only get an autosuggestion in front
of the cursor but also a menu underneath the prompt with the possibility of
tabbing through.

i mentioned 'o' simply because i thought you would want to give vimperator a try.
i mean you're absolutely right, blindly copying UI of a browser
for a shell (fish) is not a good idea. that's the mistake vimperator et al make every now
and then when they bring features from vim (an editor) into a browser without adopting them for the new application. in fact i believe they should have tried less (the pager) to begin with...

[1] haven't looked at the code, feel free to let me know what mpc is in the
parlance of fish if that help with the commutation of ideas.

@257
Copy link
Author

257 commented May 28, 2014

does it make sense? i can explain more.

@ridiculousfish ridiculousfish added this to the fish-future milestone Oct 3, 2014
@ridiculousfish
Copy link
Member

It's hard to talk about this in the abstract. I really would like to see this mocked up in a terminal window.

@257
Copy link
Author

257 commented Oct 4, 2014

please explain by what mean by "mocking up in terminal window". i mean, i don't know where to start. is there any prior ticket that was explained this way? i mean what software(s) do i need for it? is gift animation what you have in mind?

we probably need to get more people involved in this. it is a matter of explanation and my broken english is simply not adequet for it. i will post a pointer to this ticket on fish-users to see if that helps.

@257
Copy link
Author

257 commented Oct 4, 2014

another example for this would OS X's spotlight.

  1. incremental search
  2. categorised results
  3. prioritized results
  4. prioritization is configurable (i.e. user can set the priority of each category)

@ridiculousfish
Copy link
Member

My point is that the terminal window limits the sort of UIs we can make. We cannot arbitrarily position or style text, we can't use graphics, and we ought to work with small terminal sizes. So what vimperator, spotlight, etc. look like in an 80x24 text display?

@257
Copy link
Author

257 commented Oct 4, 2014

wounldn't ncurses do the positioning and styling of the text? the best example i have for that is the pop-up menu in vim. using youcompleteme (there others) one gets categorised results in a dynamically sized menu. size of the menu depends on the number of results of course. i will see if i can capture some console images for that.

ncurses should hanlde/ the terminal size as well.

and no graphics whatever. vimperator and spotlight use icons to represent different categories in GUI but we can simply work with colours. or simply dashes lines between categories. or perhaps you mean something else by graphics.

on a different note, slmenu might be usefull to look into. i can't articulate how it relates to what we're talking about here now but i will say more if you find it interesting:

http://inconsolation.wordpress.com/2013/03/16/bonus-slmenu-and-some-seriously-wicked-console-wizardry/
https://github.com/rcmdnk/sentaku

@257
Copy link
Author

257 commented Oct 4, 2014

ycm:
https://camo.githubusercontent.com/1f3f922431d5363224b20e99467ff28b04e810e2/687474703a2f2f692e696d6775722e636f6d2f304f50346f6f642e676966

i don't know if it shows in this demo but if for example suggestions are for directory paths user gets [Dir] at the far right indicating the category of the suggestion. also for functions from std C library, the related header file, like [stdio], and so on.

here is another one:
http://www.youtube.com/watch?v=hCI-EuptQv8

@257
Copy link
Author

257 commented Feb 4, 2015

@257
Copy link
Author

257 commented Feb 4, 2015

reading my own comments i realised that i didn't answer your question about inserting 'o' properly.

the answer is no; user doesn't need to enter 'o'. fish starts in that "mode". something akin to this:
https://camo.githubusercontent.com/0b07def9e05309281212369b118fcf9b9fc7948e/68747470733a2f2f7261772e6769746875622e636f6d2f6a756e6567756e6e2f692f6d61737465722f667a662e676966

user starts typing and a menu of suggestions would be presented to him. that menu, and on the fly changes to it, will of course reflect the already typed chars into the prompt. also search is fuzzy, like the example above.

two point about that menu:

  1. source of suggestions for it could be many categories; history, command arguments, file/path and so on
  2. presentation of it could be improved by partitioning it into cagetories of the sources mentioned above.

@257
Copy link
Author

257 commented Feb 14, 2015

zsh already does this a la auto-fu.zsh
https://github.com/hchbaw/auto-fu.zsh
auto-fu

@257
Copy link
Author

257 commented Nov 14, 2015

categorising down in vim-shell:
https://github.com/Shougo/vimshell.vim
vim-shell

@krader1961 krader1961 removed this from the fish-future milestone Mar 18, 2017
@krader1961
Copy link
Contributor

The proposal is not compatible with an app like fish which doesn't own the entire terminal window.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants