noice.nvim icon indicating copy to clipboard operation
noice.nvim copied to clipboard

fix(msg): add new `msg_show.shell_out` to default routes for messages

Open dpetka2001 opened this issue 9 months ago • 10 comments

Description

Add new shell_out for Neovim 0.11 onwards as kind for external commands messages

Related Issue(s)

Fixes #1097

Screenshots

dpetka2001 avatar Apr 15 '25 22:04 dpetka2001

It seems that just adding shell_out is not enough.

image

lljbash avatar Apr 16 '25 07:04 lljbash

I added shell_err and shell_ret, that seem related to the aforementioned issue. Not sure about the rest. Folke can decide what he further wants to include or not.

dpetka2001 avatar Apr 16 '25 07:04 dpetka2001

I guess this fixes #1096 as well.

lljbash avatar Apr 16 '25 07:04 lljbash

No, it doesn't from my testing. Something else must be amiss there, not sure what.

dpetka2001 avatar Apr 16 '25 07:04 dpetka2001

BTW, do you think it is a mistake that :Noice filters out almost everything from msg_show by default? https://github.com/folke/noice.nvim/blob/0427460c2d7f673ad60eb02b35f5e9926cf67c59/lua/noice/config/init.lua#L60-L106

At least with :Noice telescope I would like to see everything and filter it manually. Maybe using the all filter config for telescope? https://github.com/folke/noice.nvim/blob/0427460c2d7f673ad60eb02b35f5e9926cf67c59/lua/telescope/_extensions/noice.lua#L36-L40

lljbash avatar Apr 16 '25 08:04 lljbash

Sorry, but you're asking the wrong person about this. I have limited programming experience and am not familiar with Noice codebase at all.

This PR was just a simple fix. You should direct your question towards Folke.

dpetka2001 avatar Apr 16 '25 08:04 dpetka2001

I found something interesting regarding #1096. If you add print(#self._messages > 0) here before line 157 https://github.com/folke/noice.nvim/blob/0427460c2d7f673ad60eb02b35f5e9926cf67c59/lua/noice/view/init.lua#L156-L159, then this will be printed in the popup view.

It seems like the token from command lua require("noice").redirect("echo 3") is somehow being consumed?? No idea what might be causing this. Just mentioning this in case you might be able to figure out something that I fail to think of.

dpetka2001 avatar Apr 16 '25 08:04 dpetka2001

This PR is stale because it has been open 30 days with no activity.

github-actions[bot] avatar May 17 '25 02:05 github-actions[bot]

Helped with a lot of headache. Hopefully this gets merged.

Avsilver avatar Jul 07 '25 05:07 Avsilver

This PR is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Aug 30 '25 02:08 github-actions[bot]