jarun/nnn

Error when trying to edit a file that resides in a directory with spaces in it's name

Closed this issue · 6 comments

Environment details (Put x in the checkbox along with the information)

  • [x ] Operating System: Artix
  • [ x] Desktop Environment: dwm
  • [x ] Terminal Emulator: st
  • [x ] Shell: bash
  • Custom desktop opener (if applicable):
  • Program options used:
  • Configuration options set:
  • Plugins are installed
  • Issue exists on nnn master

Exact steps to reproduce the issue

When I try to edit a file pressing the e key if the file resides in a directory that has spaces in it's name, nnn opens new empty files with the names of the directory. Otherwise it works fine.
For example: if I highlight a file named foo.txt, that resides in a directory named ~/texts and others/foo.txt and press de key e, it opens in my editor (nvim) 2 empty files named: texts and foo.txt

Works fine on my end. Post the output of env.

$ env

SHELL=/bin/bash
WINDOWID=20971526
READER=zathura
AUDIO=mocp
NNN_FIFO=/tmp/nnn.fifo
EDITOR=nvim
XDG_SEAT=seat0
PWD=/home/rodo
LOGNAME=rodo
XDG_SESSION_TYPE=tty
XAUTHORITY=/home/rodo/.Xauthority
TERMINAL=st
WINDOWPATH=1
MOTD_SHOWN=pam
HOME=/home/rodo
LANG=es_AR.UTF-8
LS_COLORS=*.pdf=1;33:*.mp3=1;41
NNN_PLUG=m:mocq;t:-!&st*;v:imgview;E:-!sudo -E $EDITOR $nnn*;p:preview-tabbed;z:-!less -iR $nnn*
NNN_COLORS=1234
XDG_SESSION_CLASS=user
TERM=st-256color
NNN_FCOLORS=c1e2272e006033f7c6d6abc4
USER=rodo
VISUAL=ewrap
DISPLAY=:0
SHLVL=2
PAGER=less -R
XDG_VTNR=1
XDG_SESSION_ID=1
XDG_RUNTIME_DIR=/run/user/1000
DEBUGINFOD_URLS=https://debuginfod.artixlinux.org 
NNN_OPENER=/home/rodo/.config/nnn/plugins/nuke
BROWSER=firefox
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/home/rodo/suckless/zig:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/rodo/.scripts:/home/rodo/bin:/home/rodo/.scripts
DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-NP6L1A1Rrt,guid=46c35bc66b0882c1ca79fd40688df1e3
MAIL=/var/spool/mail/rodo
VIDEO=mpv
_=/usr/bin/env

I found the problem. I use a script called ewrap ( copied from somewhere) to open the editor, and there is the problem, not in nnn.
Thanks!

Idont't know if you can see why I close it.

I can see the comment. #2051 (comment)

I am sorry if i didn't close the report coorectly

It's not a problem. I've removed the 'bug' tag since it was a configuration issue and not a bug in nnn.

Also, I believe the ewrap script is recommended somewhere in the nnn wiki. I'll look into updating it so that it can process spaces in filenames correctly.