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

Setting terminal to termite in pcmanfm doesn't work when opening files with vim. #767

Closed zoj613 closed 3 years ago

zoj613 commented 3 years ago

This seems to work just fine if the terminal is set to urxvt in pcmanfm. But if I change it termite in preferences->advanced->terminal emulator, then opening files with vim inside pcmanfm does not work. Is there an extra argument I must pass to the command? Even the instruction at https://wiki.archlinux.org/index.php/PCManFM#Set_the_terminal_emulator saying it should be bash -c 'termite' dont work.

r00t- commented 3 years ago

use: bash -c 'termite -e "$*"' -- and hope that the filenames to edit never contain spaces.

zoj613 commented 3 years ago

bash -c 'termite -e "$*"' --

Did you try it on your end? The terminal won't even open running that command on mine.

EDIT: removing the -- at the end works. Now I just gotta figure out a regex that will work with files with spaces. Thanks

r00t- commented 3 years ago

normally the "--" (the actual value does not matter) is needed because the shell will use the first argument as $0:

$ sh -c 'echo $0;echo $*' foo bar baz
foo
bar baz
$

i didn't check how pacman actually builds the commandline, and i use neither program, so no, i did not try this.