jarun / nnn

n³ The unorthodox terminal file manager
BSD 2-Clause "Simplified" License
19k stars 757 forks source link

Suckless terminal in ewrap #1934

Closed kovmir closed 6 days ago

kovmir commented 6 days ago

My ewrap:

#!/usr/bin/env sh

if [ -n "$TMUX" ] ; then
    tmux split-window -h "$EDITOR \"$*\""
else
    st "nvim \"$*\""
fi

If I open nnn in st without tmux and try to open a plain-text file, I get child exited with status 1. It works if I use xterm -e in place of st in ewrap. Why does it not work with st?

N-R-K commented 6 days ago

The arguments must be separate for st. The following works for me:

st -e vim "$@"
kovmir commented 6 days ago

Ah, it should be "$EDITOR" "$@" not "$EDITOR $@". The editor and the arguments must not be a single string.