diff --git a/Troubleshooting.md b/Troubleshooting.md index cc5e098..54dda57 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -36,11 +36,14 @@ If the Esc key isn't working as expected, add the following in `.tmux To start `nnn` within tmux use a shell function: -```bash +```sh n () { - # use option -a for previews - tmux new-session nnn -a $@ + if [ -n "$TMUX" ]; then + nnn -a $@ + else + tmux new-session nnn -a $@ + fi } ```