Comments (11)
For example, in this scenario, I would think that I could select the selected suggestion with the arrow right. But it just selects the next item from the list. I mean yes if I had multiple items so that they would be displayed next to each other then it would make sense again, but if you only have a few items it is quite confusing. Especially if you are used to using an IDE.
The clink-select-complete
command has its own non-configurable key bindings. The arrow keys are for navigating around the list. If Right did something else instead of navigation, then either navigation wouldn't be possible, or the list would never be able to have more than 1 column. Those aren't acceptable limitations.
@Mqxx For comparison, look at how completion works in Powershell or in the fish shell.
Anyway, I understand your overall expectation. I'm reluctant to introduce the requested behavior, because no command shells work that way currently. And it's fundamentally incompatible with the menu-complete
commands. I think this is a case where the most effective solution is to adapt to how command shells work.
The auto-suggestion feature is the outlier. If it's creating confusing or dissatisfaction, then turn it off. Turning it off seems better than altering lots of other things to morph the auto-suggestion into a different kind of feature, where Tab inserts a displayed preview (in apps that do that, that's their only form of "completion"-like behavior, and they're riffing off of how completion has already worked for decades in command shells).
clink set autosuggest.enable false
from clink.
@Mqxx I'm sorry but I think you're mixing up "auto-suggestions" versus "completions". They're different features for different purposes.
For example see Feature Highlights.
Tab already is the completion key, and the are a few different styles of completion commands (not to be confused with auto-suggestions). Have you looked at the documentation on setting key bindings?
from clink.
Duplicate of #475.
from clink.
Ahh okay I see. Thanks. Yea I think out of my intuition I would press TAB when I see the gray auto suggestion.
from clink.
I now understand the difference between auto-suggestion vs. competion. But is it still possible to complete the suggestion using TAB instead of the arrow right?
from clink.
@Mqxx Yes, it's possible to change any and all key bindings in Clink. I really don't think changing Tab to insert an auto-suggestion will result in a good experience. I think it'd be better to turn off auto-suggestions, and let Tab continue to do completion.
I'd recommend starting at the Getting Started section of the documentation. It quickly gets to a part about key bindings, which has a link to details about how to customize key bindings. There's a lot of other useful info as well in the getting started sections.
from clink.
Thanks for the support! I'll have a look at this.
from clink.
I really don't think changing Tab to insert an auto-suggestion will result in a good experience.
I wouldn't necessarily say that... In every modern IDE or in other command lines, TAB is used as a keybind for accepting suggestions.
For example, in this scenario, I would think that I could select the selected suggestion with the arrow right. But it just selects the next item from the list. I mean yes if I had multiple items so that they would be displayed next to each other then it would make sense again, but if you only have a few items it is quite confusing. Especially if you are used to using an IDE.
Here I would think that pressing TAB would complete the suggestion. But it does not 😅
It autocompletes (or say, selects) the next entry.
I have looked at the possible keybindings in the documentation, but I have not found a setting where I can change the whole thing for auto-suggest... As far as I have seen, it is permanently bound to arrow right. The only thing I have seen that I can customize is the keybind for completion.
from clink.
I wouldn't necessarily say that... In every modern IDE or in other command lines, TAB is used as a keybind for accepting suggestions.
In all command shells, the Tab key performs what is known as "completion".
There are no command shells where Tab performs the behavior associated with the gray text in the Clink "auto-suggestions" feature.
The auto-suggestions feature in Clink is the same as the auto-suggestions feature in the famous fish shell.
I have looked at the possible keybindings in the documentation, but I have not found a setting where I can change the whole thing for auto-suggest...
"\t": clink-insert-suggested-line
As far as I have seen, it is permanently bound to arrow right.
You said you want Tab to insert the suggestion. That's totally possible; see above.
But did you mean to imply that you also want to make Right never insert the auto-suggestion text? I'm not going to build that. That would greatly complicate everything about the auto-suggestions feature.
I would recommend to completely turn off auto-suggestions, instead. It is not intended to work how you're suggesting. It is much, much less powerful/flexible than completions in general. The main purpose of auto-suggestions is to offer the most recent command from the history matching what's been typed so far, or if there are no matches then offer the first possible completion. It's a weak convenience: you could access the most recent history entry with PgUp (or like I did, change your Up binding), and you could access the first completion by pressing Tab.
from clink.
But did you mean to imply that you also want to make Right never insert the auto-suggestion text?
No
Thanks this is what I was searching for.
Is there also a way to influence the behavior of Popup Window? For example, I want Tab to insert the currently highlighted item instead of Enter from the list.
from clink.
Is there also a way to influence the behavior of Popup Window? For example, I want Tab to insert the currently highlighted item instead of Enter from the list.
The popup list key bindings are not configurable.
The documentation section on how they work covers the keys they recognize.
from clink.
Related Issues (20)
- Disable startup message HOT 2
- how to use `os.setalias()` HOT 1
- How change shortcut for Popup Windows HOT 19
- prompt shows leftover text sometimes HOT 2
- Modify Heading HOT 5
- the new `os.setalias` ignore the flags and args HOT 1
- Where to define environment variables in CMD or Clink? HOT 2
- Question: Expanding environment variables during auto complete HOT 9
- some problems HOT 1
- No message print when an update is available HOT 2
- Show history filtered by the typed command HOT 4
- The installer is not copying any files to the newly created %LOCALAPPDAT%\clink directory HOT 3
- What's the diffs to https://github.com/mridgers/clink? HOT 2
- Request: CTRL+D to exit terminal. HOT 4
- How to stop colors? HOT 6
- Change color for cmd command? HOT 7
- things not working HOT 2
- Proper way to update via scoop or clink update? HOT 7
- The last character of a right-aligned prompt gets erased HOT 4
- Clink messes with git bash autocomplete HOT 1
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 clink.