Comments (5)
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.
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.
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.
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.
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)
- fish_config broken under WSLv1
- count full width space (aka Ideographic Space or U+3000) as a space HOT 3
- Default completion for less doesn't include all options HOT 1
- [feature] environment variable conditional exports HOT 1
- Mistyping argument shows fish error HOT 5
- Fish segfaults after every fork() after running a command that leaves stdout in non-blocking mode HOT 5
- Fish has stopped suggesting autocompletions HOT 4
- "yes" would trigger unstoppable new lines HOT 2
- Fzf ** is not working HOT 3
- user fault, found in documentation as working as designed ( indexing "echo array[$first..$last]" should be the same using command substitution output as "echo (output stuff)[$first..$last] but fails in latter case when using variables for index)
- Argument is not a number: 'Alacritty' HOT 4
- Feature request: add `funcat` to the `funcsave` `funced` familly? HOT 3
- Inconsistent literalization behavior of `{ ... }` context HOT 2
- Implement `string unescape --style=regex`
- `...` instead of `../..`, `....` instead of `../../../`, etc HOT 5
- *Escaped* NUL is taken to mean end-of-string at the command line HOT 2
- `__fish_seen_argument` cannot handle long arguments like `--config=thisA` HOT 1
- fish_indent --write only write file if formatting changed
- vi mode: Better differentiate between `aw`, `iw` and `w`, `e` text-objects
- misleading suggestion to use a bracketed variable
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fish-shell.