Giter Site home page Giter Site logo

Comments (8)

krobelus avatar krobelus commented on July 21, 2024 2

I appreciate the problem and I have hit it too occasionally; I agree it would be nice to improve but it's hard to tell if this approach is worth it.

Perhaps we can rethink this as a problem of "undo". Ideally it should be trivial to go back to any previous state of the UI.
For example, ctrl-z should restore the cursor position; maybe we can do something about the completions as well

Alas I would have no idea how to implement it myself

https://drewdevault.com/2017/01/06/Actually-you-CAN-do-it.html
Also a complete specification would already help, the implementation is secondary.
But someone needs to think about the implications, my feeling is that the different sort order will end up being too hacky

and you are the arbiters after all.

I don't think so, count me out at least. Also we simply don't know enough to judge something until someone has done the work

from fish-shell.

faho avatar faho commented on July 21, 2024

The completions always show the next argument, so the descriptions here are for the next option.

That means you got the description for "-c" when you picked it. Once you picked it it's done.

That seems about right and there's not really a good spot to place descriptions for what was already completed - if we put it at the top it would be another candidate to pick, and you already picked it. (the top spot is also pretty bad because it's the easiest to pick, and what you already have is the least likely option to be picked - in most cases it's useless to specify options twice)

I don't believe there is anything workable for us to do here, sorry.

from fish-shell.

krobelus avatar krobelus commented on July 21, 2024

yeah I think it would be confusing if complete -C'g++ -c' would have different descriptions from complete -C'g++ -c -'
because semantically they are they same (assuming there'll be an option added)

from fish-shell.

thernstig avatar thernstig commented on July 21, 2024

@faho @krobelus I am not entirely sure the feature request was understood, or I am reading into your answer incorrectly. Or maybe you did since you do not believe there is anything that can be done.

I understand how it works today.

I want to be able to read a description of an argument quickly, without having to go up and down a list of 800 items. How do I do that in a sensible way via tab completions?

I can mention I over the years often have gotten into this problem wanting to check a description of an argument quickly with fish and tab completion, but there is no easy way to write the actual letter you want to check the description for.

The argument for that it would be another option put at the top could easily be fixed by not making those options selectable. But that was just one implementation proposal, there might be others, better ones.

from fish-shell.

faho avatar faho commented on July 21, 2024

I understand what you mean, I do not believe the implementation complexity is warranted.

This would entail creating a new spot to place old descriptions and rerunning the completion script for the previous option, and that's quite a bit of added complexity.

The current implementation is nice and "simple" - we select the single next token, and that one is described. Once you have picked it, it's done.

from fish-shell.

krobelus avatar krobelus commented on July 21, 2024

It could be worth trying to place first whatever option was last, that's a raw simple text comparison with fail-safe, so it should work without computing completions twice

It could also be a separate text box but that's probably not worth it for this feature alone

from fish-shell.

thernstig avatar thernstig commented on July 21, 2024

@faho @krobelus I think it would have brought the shell from the 90s to the 00s ;)

My intention for creating this post was that fish has always been awesome at improving the shell experience. I know for a fact I, and probably others, often bump into the situation where shorthand arguments are shown in a lot of online resources. Copy&pasting such options and also quickly checking descriptions of the options via fish tab completion would imo have been a nice addition that is warranted.

Alas I would have no idea how to implement it myself and you are the arbiters after all.

(#6924 turned out nice so I really thought I was onto something here 😆)

from fish-shell.

thernstig avatar thernstig commented on July 21, 2024

Thanks for the insights @krobelus and for being courteous. I think we can let this issue linger here and maybe in the future someone will want this more-and-more and implement it. Maybe I get some downtime in the future to give it a try to have something to show. Or that some other hero steps in to give it a try.

from fish-shell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.