Giter Site home page Giter Site logo

Comments (5)

mqudsi avatar mqudsi commented on July 20, 2024

then add that option to the autocorrect

Do you mean add that as a completion option? Because we already do (unless there is a match for the argument as currently entered). If not, well, we don't have "an autocorrect".

Can you be more specific and provide a reproducible case with step-by-step what your environment contains, what you type in, and at what point you want what to show what?

from fish-shell.

piekay avatar piekay commented on July 20, 2024

A simple example would be:

typing cd Dekt

and then pressing Tab to trigger completion. Currently fish doesn't react to that at all. It would be nice, if fish could recommend Desktop anyways.

This could be solved by both adding the current String and the “corrected“ String to the autocompletion, to allow a user to easily switch between what was typed and what the algorithm thinks was meant. Adding what the user typed to the autocomplete menu fixes the common issue with these systems that is that if someone types mkdir -p /user and then presses tab, because they want to create a /userdata/stuff folder it is easy to switch back from /usr to /user

from fish-shell.

zanchey avatar zanchey commented on July 20, 2024

typing cd Dekt

This does trigger completion to cd Desktop for me - there's a fuzzy matching algorithm, noted in #568 (comment)

Triggering the pager when an exact or prefix match is not available would be different, though. I'm not sure that's a better experience (tab twice and enter to accept a substring match?)

from fish-shell.

piekay avatar piekay commented on July 20, 2024

typing cd Dekt

This does trigger completion to cd Desktop for me - there's a fuzzy matching algorithm, noted in #568 (comment)

Triggering the pager when an exact or prefix match is not available would be different, though. I'm not sure that's a better experience (tab twice and enter to accept a substring match?)

Oops, I actually messed up the cd Command. Correct would be cd Deks and then pressing tab.

My idea would be to correct it the first time you press tab, but also keep the uncorrected version around, basically offering to correct it to Desktop, while also allowing you to switch back by pressing tab again instead of Escape (for convenience, since the completion would more or less guess in these cases)

from fish-shell.

mqudsi avatar mqudsi commented on July 20, 2024

This would be doable by using a proper string distance algorithm instead of the current rudimentary typo detection, though it would not keep around both the misspelling and the corrected version and would be without the pager, if I am correctly remembering how the completions machinery currently works.

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.