thestinger / termite

Termite is obsoleted by Alacritty. Termite was a keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support.
https://github.com/alacritty/alacritty
2.74k stars 241 forks source link

Strange behavior when trying to exec nvim with a file via command line #709

Closed indeedwatson closed 4 years ago

indeedwatson commented 4 years ago

termite -e nvim ~/vimwiki/todo.txt

This opens a new terminal with nvim with an empty file ~/vimwiki/todo.txt, even tho that file exists and is not empty.

Opening nvim directly with the file (without preceding it with termite -e) follows expected behavior, it opens nvim with the existing file and contents of the given file.

I struggle to understand how and why this is happening.

indeedwatson commented 4 years ago

Testing with other examples: termite -e "ranger ~/Downloads/" will open a new terminal and close it immediately, I don't even see ranger being opened before the terminal is closed.

meithecatte commented 4 years ago

Note that ~ as a shortcut to $HOME is a shell feature. nvim is probably getting an unprocessed path and deciding that you are referring to a to-be-created directory literally called ~.

indeedwatson commented 4 years ago

Yeah I forgot to comment and close, I was pointed to exactly that on reddit. Thanks!