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
{{ message }}
Repository navigation
Interactive commands like fzf in external completer closure dont work after the non-blocking completion change #18771
Probably introduced by the non-blocking completion change. I know my external completion setup is quite heavy, but it's now literally not usable for me.
Essentially, after discussing privately with @blindFS I am under the belief that this is not a bug or regression, but a result of aligning the behavior of completions to their intended design.
Respectfully, I believe that completions are designed as an uninteractive process. This means that they can be used and relied upon in both the main shell/repl and within scripts. I believe this consistency is important to uphold, and allows for many of the streamlinining I've been able to do. The alternative would be conditional exclusion of certain completors, which adds confusion optionality for an under/less explored case, which increases fragility and makes debugging more difficult.
I find the case described here, and other ones like it, more befitting to other nushell mechanisms. Nushell has a rich set of operative for managing and manipulating the commandline and prompt, and I think behaviors like this should be relegated to this area of the shell.
This being said, this has been proven to have been a longstanding assumption, and more documentation may be needed to ensure this isn't a future point of pain. I can handle this.
Well, I don't see any other ways of integrating fzf into the completion closure. Perhaps the non-blocking completion change made things better organised somehow. But it literally limits the customisability. I would suggest that we provide an option to fallback to the old way.
However, if @philocalyst manages to provide alternative ways to achieve similar UX for me, I'm happy to change.
@kronberger-droid Thanks for providing an alternative solution that actually makes sense somehow. I'll try to update my config following that route when I get time. I believe the commandline complete command is introduced recently.
But still, I don't think another fallback option will make the code a lot harder to maintain (correct me if I'm wrong), and it greatly helps users like me, maybe @Juhan280 as well to take time and adapt to new ways of customizing things.
Besides, there could be other interactive external completer requirements, like printing a progress bar, etc. I would argue that if we plan to ban them all, it's probably better to make it an experimental feature.
There is no "banning", as @kronberger-droid showed, it's plenty easy to add a progress bar. This is just a matter of scope for completions. I don't think the scope defines interactive events. This I think, even allows for more complex interactive interactions due to the predictability of the mechanism (otherwise you couldn't reliably nest commandline completion, and more). This means more avenues open up, and users can expect a more predictable time.
As far as experimental designation goes, I have no idea how nushell decides what is and is not marked. It would be impossible to automatically warn users (lots of interactive commands). But also is a silent no-op. My ideal is "this commands behavior has changed, please reference DOCS_LINK before submitting an issue if you detect a regression".
Maintaining a separate option is a waste of time in my view, as long as we can communicate to users they may need to upgrade their config.
@philocalyst a progress bar of external completion call? I don't think it's that easy to implement after your changes. And it's just one possibility.
As for the experimental flag, I think it's exactly designed for such features that could potentially break a lot of user configurations.
And for the extra option as I suggested, it's not necessary if you can make the change experimental, otherwise it serves well as a stopgap so that users can have a much nicer transition experience.
I could be wrong, but I don't believe this would break a lot of user configurations. Your setup is over 600 lines of nu. Going the route you did is always going to require a high level of configuration accumen. Most users don't even have 60 lines of total configuration, I would guess. And for the ones it does break, who are already highly inclined to configure, you would just swap it out for what was suggested.
You could add within your fzf_complete within the keybinding setup. Again, to me it just sounds like you would prefer some kind of different UI, either to select completions or to show some aspect of their execution. Nu likely has the mechanisms to provide this, if properly extended. I'm happy to provide advice/assistance to anyone (you or otherwise) who contributes such a thing.
I think that by drawing the line here, custom/external completions will become many degrees more portable (I saw a lot of tricks in your configuration that aren't in any of the completors I use!), without significant adaptation for those who want to shed restraint.
Let's keep moving forward with the non-blocking completions changes to make it more stable and more bug free. Once that is done I think it'll be easier to add a config option or fallback. I, for one, do not want to disallow fzf or carapace or zoxide and other ways to completions. I just feel like we need to get the current work-in-progress landed in a great state first.
Let's keep moving forward with the non-blocking completions changes to make it more stable and more bug free. Once that is done I think it'll be easier to add a config option or fallback. I, for one, do not want to disallow fzf or carapace or zoxide and other ways to completions. I just feel like we need to get the current work-in-progress landed in a great state first.
Sure, I'm not saying a fallback option is of high priority for now.
But we should really keep an eye on the potential impact.
I'm not willing to stand behind configuration options because this usage was never supported, feel free to read through the existing docs -- it's very clearly implied that completions are standalone. As proven already by @kronberger-droid, there is a path that is officially supported. It is surprising to me that you would want to use a configuration that 0.0001% of the userbase drives for such critical behavior.
Carapace, zoxide, even fzf can be used in this scheme, they just need to be interacted with in a pre-determined way.
@philocalyst
What i would like to know is if @blindFS is right that we are right now not able to implement non-interactive status messages for completions.
Since the non-blocking path now opens up a lot of possibilities for longer running completions, which would greatly benefit from a way to show their status somehow.
I agree with you that as long as there is a way to achieve similar if not same functionality using different tools we would encourage people to switch, but also provide them with the information, that they might have to.
But we still should take care to not to alienate users or our members, if they have built their config on an non-enforced contract stated somewhere in the docs.
@philocalyst I think I've made myself crystal clear. I agree with both of you that we should encourage users to switch to new ways of doing things in the long run.
But it's very annoying to be forced to read through the changelog and try to figure out what's going wrong the very first day of a new upgrade. And it is totally avoidable with some simple changes.
And it's quite funny that we're arguing about how rare the affected users would be but not how much effort an extra option cost. What if the linked zoxide PR got merged? How many users do you think use Nushell with the default zoxide integration?
Well now I actually found a use-case thanks to @fdncred 's repro. If we have a large amount of suggestions it makes sense to be able to fzf and if they are a lower number just show it in the builtin menu.
Nice
I'm VERY confused on what's going here at this point, I'm totally fine with @kronberger-droid 's escape hatch, sure, but at this point I'm counting over 2000+ diff to, now, essentially roundabout-revert non-blocking-completions? With an option that is now redundant, an experimental feature that is irrelevant, and STILL breakages?
If either of one you just @ mentioned me in your PR's I would have been happy to review, because now there's going to be this weird double-switchback that must happen to re-rail non-blocking-completions.
I really stick to my original impression that these confusions are really not the fault of the completions API, and more the fault of the naming/presentation of it; the real path is of course strengthening surrounding abstractions for commandline editing so these two use-cases could be preserved without this rapturing of the completions contract, which made non-blocking completions possible in the first place.
@philocalyst
You are right that landing both was kind of redundant, since a large part of completers, namely external ones are again blocking.
With a good reason, since we cannot know if the defined completer will take over the TTY.
The experimental option is really not a problem, I really don't know why you keep comming back to it. As I said already, since its opt-out it does not change anything by default!
(Which I did against the convention of making it first opt-in, because I think its a great feature and should not be gated for all users)
I know its not pretty.
Still...
until we figure out how to either handle these types of completers, which just simply are possible and used!
We just can't enforce the "contract" you have in mind.
I am very open to try and define the contract and make it an independent feature.
But on the same breath we have to think about how to also serve people like blind who use a completer which just can't follow the contract.
I just said it wasn't an issue! I came back to it to present a full picture.
And again, we don't need external completers to be blocking. We don't have to care if they want to take over the TTY, because we can just enforce that they can't. If fzf wants to work like a completor, then we should provide a different interface, not overload this one, and make the 99% of external completers blocking when they don't need to be, for the 1% that actually benefits.
If someone like blind has a completor that can't follow the contract, then they have:
Using the experimental feature to create an escape hatch
Rewriting it so it does follow the contract
For pre-1.0 software, I don't see how this is problematic.
Again the issue here for me is that when I talked with everyone about this three weeks ago, we described this issue as "settled" and then, all of a sudden, within 24 hours, everything is decided and hundreds of lines of complexity were merged.
I was under the impression that completers didn't have serious effort put into them for 2+ years, and now I must believe that everyone is such an expert that they can merge unreviewed fixes + tests within half an hour?
But, we don't have a feature to support fzf as it seems.
Me, just like you, did not take to much of a look into it the alternatives, but it seems that they are lacking.
Yes if we decide for a strict contract, we should enforce it.
But we don't.
So it does not make sense to ship something we can't make sure works for most of the possible configurations.
We have now 1 release cicle to define the contract and enforce it.
And pull apart the different ways to define completions and make one the feature that blind might use.
I am very happy to work on this contructively.
But I really have not the nerves to continue these type of discussions.
I understand your concern, but I think I agree that you kind of played with flaw in how we enforced the contract.
This is a statement from you at the beginning of this. There has always been a contract. There has always been alternatives.
We shipped something and it did work for most of the possible configurations. It did not work for some large public-facing ones, like here in fzf and likely elsewhere. But that is not most, and fortunately these projects are the most flexible to change.
Breaking changes break things.
I am approaching this purely constructively. If my tone is off, that's purely because I have been thinking about completors for coming up on two months now. Having this and that being merged willy-nilly and (to my eyes) a misunderstanding of the consequences is uh... weird.
Activity
fdncred commentedon Jul 23, 2026
/cc @philocalyst
philocalyst commentedon Jul 25, 2026
Essentially, after discussing privately with @blindFS I am under the belief that this is not a bug or regression, but a result of aligning the behavior of completions to their intended design.
Respectfully, I believe that completions are designed as an uninteractive process. This means that they can be used and relied upon in both the main shell/repl and within scripts. I believe this consistency is important to uphold, and allows for many of the streamlinining I've been able to do. The alternative would be conditional exclusion of certain completors, which adds confusion optionality for an under/less explored case, which increases fragility and makes debugging more difficult.
I find the case described here, and other ones like it, more befitting to other nushell mechanisms. Nushell has a rich set of operative for managing and manipulating the commandline and prompt, and I think behaviors like this should be relegated to this area of the shell.
This being said, this has been proven to have been a longstanding assumption, and more documentation may be needed to ensure this isn't a future point of pain. I can handle this.
blindFS commentedon Jul 25, 2026
Well, I don't see any other ways of integrating fzf into the completion closure. Perhaps the non-blocking completion change made things better organised somehow. But it literally limits the customisability. I would suggest that we provide an option to fallback to the old way.
However, if @philocalyst manages to provide alternative ways to achieve similar UX for me, I'm happy to change.
kronberger-droid commentedon Jul 25, 2026
@blindFS I understand your concern, but I think I agree that you kind of played with flaw in how we enforced the contract.
How about something like this:
Probably needs some tweaking to handle all cases nicely.
But should essentially do the same and is more "idiomatic" usage I would guess.
blindFS commentedon Jul 25, 2026
@kronberger-droid Thanks for providing an alternative solution that actually makes sense somehow. I'll try to update my config following that route when I get time. I believe the
commandline completecommand is introduced recently.But still, I don't think another fallback option will make the code a lot harder to maintain (correct me if I'm wrong), and it greatly helps users like me, maybe @Juhan280 as well to take time and adapt to new ways of customizing things.
Besides, there could be other interactive external completer requirements, like printing a progress bar, etc. I would argue that if we plan to ban them all, it's probably better to make it an experimental feature.
philocalyst commentedon Jul 25, 2026
There is no "banning", as @kronberger-droid showed, it's plenty easy to add a progress bar. This is just a matter of scope for completions. I don't think the scope defines interactive events. This I think, even allows for more complex interactive interactions due to the predictability of the mechanism (otherwise you couldn't reliably nest commandline completion, and more). This means more avenues open up, and users can expect a more predictable time.
As far as experimental designation goes, I have no idea how nushell decides what is and is not marked. It would be impossible to automatically warn users (lots of interactive commands). But also is a silent no-op. My ideal is "this commands behavior has changed, please reference DOCS_LINK before submitting an issue if you detect a regression".
Maintaining a separate option is a waste of time in my view, as long as we can communicate to users they may need to upgrade their config.
blindFS commentedon Jul 25, 2026
@philocalyst a progress bar of external completion call? I don't think it's that easy to implement after your changes. And it's just one possibility.
As for the experimental flag, I think it's exactly designed for such features that could potentially break a lot of user configurations.
And for the extra option as I suggested, it's not necessary if you can make the change experimental, otherwise it serves well as a stopgap so that users can have a much nicer transition experience.
philocalyst commentedon Jul 25, 2026
I could be wrong, but I don't believe this would break a lot of user configurations. Your setup is over 600 lines of nu. Going the route you did is always going to require a high level of configuration accumen. Most users don't even have 60 lines of total configuration, I would guess. And for the ones it does break, who are already highly inclined to configure, you would just swap it out for what was suggested.
You could add within your fzf_complete within the keybinding setup. Again, to me it just sounds like you would prefer some kind of different UI, either to select completions or to show some aspect of their execution. Nu likely has the mechanisms to provide this, if properly extended. I'm happy to provide advice/assistance to anyone (you or otherwise) who contributes such a thing.
I think that by drawing the line here, custom/external completions will become many degrees more portable (I saw a lot of tricks in your configuration that aren't in any of the completors I use!), without significant adaptation for those who want to shed restraint.
blindFS commentedon Jul 25, 2026
As I mentioned to you, there're at least 2 different users that use interactive external completer, and are driven (not my words) "insane".
And you probably know that the users willing to try nightly builds only contribute to a small fraction.
IMHO, it's not a good habit to presume how users would use a tool as a maintainer.
And I'm quite surprised that you stand against lightweight changes that make it backwards compatible.
fdncred commentedon Jul 25, 2026
Let's keep moving forward with the non-blocking completions changes to make it more stable and more bug free. Once that is done I think it'll be easier to add a config option or fallback. I, for one, do not want to disallow fzf or carapace or zoxide and other ways to completions. I just feel like we need to get the current work-in-progress landed in a great state first.
blindFS commentedon Jul 25, 2026
Sure, I'm not saying a fallback option is of high priority for now.
But we should really keep an eye on the potential impact.
philocalyst commentedon Jul 25, 2026
I'm not willing to stand behind configuration options because this usage was never supported, feel free to read through the existing docs -- it's very clearly implied that completions are standalone. As proven already by @kronberger-droid, there is a path that is officially supported. It is surprising to me that you would want to use a configuration that 0.0001% of the userbase drives for such critical behavior.
Carapace, zoxide, even fzf can be used in this scheme, they just need to be interacted with in a pre-determined way.
kronberger-droid commentedon Jul 25, 2026
@philocalyst
What i would like to know is if @blindFS is right that we are right now not able to implement non-interactive status messages for completions.
Since the non-blocking path now opens up a lot of possibilities for longer running completions, which would greatly benefit from a way to show their status somehow.
I agree with you that as long as there is a way to achieve similar if not same functionality using different tools we would encourage people to switch, but also provide them with the information, that they might have to.
But we still should take care to not to alienate users or our members, if they have built their config on an non-enforced contract stated somewhere in the docs.
philocalyst commentedon Jul 25, 2026
As of right now, yes blindfs is right. This is something that I'm doing on my completions rework, providing a status indicator!
It's not a fancy bar or anything, again I think there's a real case for eventually allowing users to override the UI/UX around completions.
Agree with the rest.
blindFS commentedon Jul 25, 2026
@philocalyst I think I've made myself crystal clear. I agree with both of you that we should encourage users to switch to new ways of doing things in the long run.
But it's very annoying to be forced to read through the changelog and try to figure out what's going wrong the very first day of a new upgrade. And it is totally avoidable with some simple changes.
And it's quite funny that we're arguing about how rare the affected users would be but not how much effort an extra option cost. What if the linked zoxide PR got merged? How many users do you think use Nushell with the default zoxide integration?
22 remaining items
feat(completions): add a `background-completions` opt-out (nushell#18764
kronberger-droid commentedon Aug 22, 2026
Well now I actually found a use-case thanks to @fdncred 's repro. If we have a large amount of suggestions it makes sense to be able to fzf and if they are a lower number just show it in the builtin menu.
Nice
fix(completions): keep the REPL usable when a completer runs `fzf` or…
philocalyst commentedon Aug 23, 2026
I'm VERY confused on what's going here at this point, I'm totally fine with @kronberger-droid 's escape hatch, sure, but at this point I'm counting over 2000+ diff to, now, essentially roundabout-revert non-blocking-completions? With an option that is now redundant, an experimental feature that is irrelevant, and STILL breakages?
If either of one you just @ mentioned me in your PR's I would have been happy to review, because now there's going to be this weird double-switchback that must happen to re-rail non-blocking-completions.
I really stick to my original impression that these confusions are really not the fault of the completions API, and more the fault of the naming/presentation of it; the real path is of course strengthening surrounding abstractions for commandline editing so these two use-cases could be preserved without this rapturing of the completions contract, which made non-blocking completions possible in the first place.
kronberger-droid commentedon Aug 23, 2026
@philocalyst
You are right that landing both was kind of redundant, since a large part of completers, namely external ones are again blocking.
With a good reason, since we cannot know if the defined completer will take over the TTY.
The experimental option is really not a problem, I really don't know why you keep comming back to it. As I said already, since its opt-out it does not change anything by default!
(Which I did against the convention of making it first opt-in, because I think its a great feature and should not be gated for all users)
I know its not pretty.
Still...
until we figure out how to either handle these types of completers, which just simply are possible and used!
We just can't enforce the "contract" you have in mind.
I am very open to try and define the contract and make it an independent feature.
But on the same breath we have to think about how to also serve people like blind who use a completer which just can't follow the contract.
philocalyst commentedon Aug 23, 2026
I just said it wasn't an issue! I came back to it to present a full picture.
And again, we don't need external completers to be blocking. We don't have to care if they want to take over the TTY, because we can just enforce that they can't. If fzf wants to work like a completor, then we should provide a different interface, not overload this one, and make the 99% of external completers blocking when they don't need to be, for the 1% that actually benefits.
If someone like blind has a completor that can't follow the contract, then they have:
For pre-1.0 software, I don't see how this is problematic.
philocalyst commentedon Aug 23, 2026
Again the issue here for me is that when I talked with everyone about this three weeks ago, we described this issue as "settled" and then, all of a sudden, within 24 hours, everything is decided and hundreds of lines of complexity were merged.
I was under the impression that completers didn't have serious effort put into them for 2+ years, and now I must believe that everyone is such an expert that they can merge unreviewed fixes + tests within half an hour?
kronberger-droid commentedon Aug 23, 2026
Sure...
But, we don't have a feature to support fzf as it seems.
Me, just like you, did not take to much of a look into it the alternatives, but it seems that they are lacking.
Yes if we decide for a strict contract, we should enforce it.
But we don't.
So it does not make sense to ship something we can't make sure works for most of the possible configurations.
We have now 1 release cicle to define the contract and enforce it.
And pull apart the different ways to define completions and make one the feature that blind might use.
I am very happy to work on this contructively.
But I really have not the nerves to continue these type of discussions.
philocalyst commentedon Aug 23, 2026
This is a statement from you at the beginning of this. There has always been a contract. There has always been alternatives.
We shipped something and it did work for most of the possible configurations. It did not work for some large public-facing ones, like here in fzf and likely elsewhere. But that is not most, and fortunately these projects are the most flexible to change.
Breaking changes break things.
I am approaching this purely constructively. If my tone is off, that's purely because I have been thinking about completors for coming up on two months now. Having this and that being merged willy-nilly and (to my eyes) a misunderstanding of the consequences is uh... weird.
Fix CI: Pin nushell version to 0.114 (junegunn#4898)
Fix CI: Pin nushell version to 0.114 (junegunn#4898)