system_open command cannot open certain types of files properly #2528
-
DescriptionI use nvim-tree's system open on the Linux desktop, but some types of files cannot be opened, while others can. Neovim version
Operating system and versionLinux 6.1.56-1-lts x86_64 rolling n/a Windows variantNo response nvim-tree versionClean room replication-- disable netrw at the very start of your init.lua (strongly advised)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- set termguicolors to enable highlight groups
vim.opt.termguicolors = true
-- empty setup using defaults
require("nvim-tree").setup() Steps to reproduce
Expected behaviorNo response Actual behaviorNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I think it may be related to input and output, so I tried to disable output redirection and it worked properly, but I don't know why. system-open-test.mp4 |
Beta Was this translation helpful? Give feedback.
-
That's... just how Run Long ago I overrode xdg-open and have never looked back: : ; cat /usr/local/bin/xdg-open
#!/bin/sh
# Suppress any spurious output from noisy apps like chrome.
# Invoke /usr/bin/xdg-open directly for more interactive operations.
/usr/bin/xdg-open "${@}" > /dev/null 2>&1 |
Beta Was this translation helpful? Give feedback.
That's... just how
xdg-open
works. nvim-tree will simply callsystem_open.cmd
with the absolute file path as the argument.Run
xdg-open something.js
directly from a terminal to see what is going on.Long ago I overrode xdg-open and have never looked back: