You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
proper completion for cd that doesn't use history if it's not appropriate
Reacted by Alec Thomas, Igor Krupenja, Omer Tuchfeld, Térence Clastres, Thomas Versteeg, Oleg, someniatko, Michael Chris Lopez, Helder S Ribeiro, I60R and 77 more
IMO this is the feature that will drive adoption the most. This and probably inline help for commands.
Completions will allow discoverability, where currently there is zero. I type ps | where and I have no idea what fields area available.
Reacted by Igor Krupenja, Mauro Bieg, Ludwig Stecher, chrisleee, Helder S Ribeiro, Per Lundberg, Michael Chris Lopez, mak, Eli W. Hunter, Dhruv Dhamani and 53 more
Moreover, if completion information is unknown for a command, maybe it's possible to suggest a list of columns gathered from recent runs of the command. Usually I would do something like this:
type ls
See the unfiltered output to decide what needs to be filtered
type ls | where somecolumn=somevalue according to what I saw in step (2)
Maybe nu could intercept the output in step (2) to cache the different column names / some common values for those columns and suggest those when offering completion in (3).
Reacted by Avi Dessauer, Alec Thomas, Hicham el Allouchi, max-hk, rusty kay and fingerblaster
IMO it would be ideal if plugins could (perhaps optionally if not by default) declare an output schema. Completions could then use the schema.
Reacted by John Children, Ludwig Stecher, Helder S Ribeiro, Nikolaus Waxweiler, Khải, Serhii Krupskyi, Sean Perry, Oleksii Filonenko, Kenny, Callum Tolley and 6 more
Can I suggest you take some inspiration from fish shell on this. It's completions and suggestions work like magic and this is probably the biggest issue at least for me before I'd consider adopting nushell as my shell of choice
Reacted by Thomas Heartman, Martin Matous, Florin Oltean, mak, Artem Polishchuk, samrg472, aeosynth, Tianxiang Chen, 8176135, Dhruv Dhamani and 35 more
Would it be possible to consider having the autocompletion behaviour configurable?
In particular, I like a lot if for a directory containing foobar, foobaz, foobar001, ... , foobaz125. I start typing f, press Tab and get fooba instead of one of the possible entries.
I understand some folks like the current behaviour but I personally find it very frustrating when exploring the list of files in a directory. I probably am biased by my daily use of zsh with the zsh-syntax-plugin
Reacted by Shaurya Shubham, Sean Perry, locnide, 阎先生 and Akash Gurava
I see there is a desire to support autocomplete of commands, is there any desire for nu to support completion of file names / directory names in real-time as well?
I saw that the git branch is displayed in the command prompt but when I enter git checkout branch_name_start
and press Tab nothing happens. Is Git branch completion implemented?
Ancient, but I'm still very much invested in this issue.
Reacted by Zeeshan Ali Khan, Jakub Jirutka, Carlos Fontes, Grégoire Geis, deathtrip, buster-blue, Mateusz Mikuła, Fabian Deifuß, Mon, Felix Zeller and 2 more
Which parts are you all invested in? We have completions, and the start to external completions.
Then perhaps it's miscommunication. The issue was closed with just ancient as the reason instead of being closed by PRs and all the checkboxes in the description are still unchecked.
ya, that makes sense. I was half asleep when I closed it last night. Sorry. :)
I checked all the boxes in the issue because completions work for commands, plugins, and cd'ing. There's some fancy stuff going on too with menus and such. Like this one.
I checked all the boxes in the issue because completions work for commands, plugins, and cd'ing.
While completions work with cd, it still suggests history that isn't appropriate. For example: I cd into FolderA. I type cd again. It recommends FolderA, even though FolderA does not have a sub-folder/file called FolderA.
Activity
[-]MVP #3 Tracking Issue[/-][+]Release #3 Tracking Issue[/+][-]Release #3 Tracking Issue[/-][+]Release #3 - Completions[/+]alecthomas commentedon Aug 24, 2019
IMO this is the feature that will drive adoption the most. This and probably inline help for commands.
Completions will allow discoverability, where currently there is zero. I type
ps | whereand I have no idea what fields area available.omertuc commentedon Aug 24, 2019
Moreover, if completion information is unknown for a command, maybe it's possible to suggest a list of columns gathered from recent runs of the command. Usually I would do something like this:
lsls | where somecolumn=somevalueaccording to what I saw in step (2)Maybe nu could intercept the output in step (2) to cache the different column names / some common values for those columns and suggest those when offering completion in (3).
alecthomas commentedon Aug 25, 2019
IMO it would be ideal if plugins could (perhaps optionally if not by default) declare an output schema. Completions could then use the schema.
alper commentedon Sep 30, 2019
Do I get it right that arrow right completes the current suggestion but that this isn't documented yet?
syvanpera commentedon Sep 30, 2019
Can I suggest you take some inspiration from fish shell on this. It's completions and suggestions work like magic and this is probably the biggest issue at least for me before I'd consider adopting nushell as my shell of choice
Nemikolh commentedon Oct 3, 2019
Would it be possible to consider having the autocompletion behaviour configurable?
In particular, I like a lot if for a directory containing
foobar,foobaz,foobar001, ... ,foobaz125. I start typingf, pressTaband getfoobainstead of one of the possible entries.I understand some folks like the current behaviour but I personally find it very frustrating when exploring the list of files in a directory. I probably am biased by my daily use of
zshwith thezsh-syntax-pluginJosephTLyons commentedon Jan 29, 2020
I see there is a desire to support autocomplete of commands, is there any desire for nu to support completion of file names / directory names in real-time as well?
kazysmaster commentedon Feb 6, 2020
I think it would be nice to have ide like file/directory name completion.
schoetbi commentedon Jun 15, 2020
I saw that the git branch is displayed in the command prompt but when I enter
git checkout branch_name_startand press Tab nothing happens. Is Git branch completion implemented?
13 remaining items
rsteube commentedon Oct 14, 2021
Got rid of the hardcoding by using the config (persistent, but seems to be the best approach with current nushell capabilities).
So basically commands can be configured to be called for completion which then return json:
Merge pull request nushell#290 from nushell/update_cell_path
fdncred commentedon Feb 18, 2022
ancient
igitur commentedon Feb 18, 2022
Ancient, but I'm still very much invested in this issue.
fdncred commentedon Feb 18, 2022
Which parts are you all invested in? We have completions, and the start to external completions.
zeenix commentedon Feb 18, 2022
Then perhaps it's miscommunication. The issue was closed with just
ancientas the reason instead of being closed by PRs and all the checkboxes in the description are still unchecked.fdncred commentedon Feb 18, 2022
ya, that makes sense. I was half asleep when I closed it last night. Sorry. :)
I checked all the boxes in the issue because completions work for commands, plugins, and cd'ing. There's some fancy stuff going on too with menus and such. Like this one.
This was posted in discord #cool-oneliners.
Feel-ix-343 commentedon Jun 20, 2022
This has been very hard to follow. Are there any updates?
Just started trying nushell out, but cant use it without something like zsh completions plugin
fdncred commentedon Jun 20, 2022
There are some custom completions in our nu_scripts repo.
tobiasBora commentedon Nov 5, 2022
Carapace-bin also provides more completions https://github.com/rsteube/carapace-bin
DeadRobotDev commentedon Nov 26, 2022
While completions work with cd, it still suggests history that isn't appropriate. For example: I cd into FolderA. I type cd again. It recommends FolderA, even though FolderA does not have a sub-folder/file called FolderA.
rsteube commentedon Nov 26, 2022
@DeadRobotDev probably best to open a new issue for that
Add Pwsh 7 && and || to operator map page (nushell#290)