jarun/nnn

nnn compiled with nerdfonts not displaying correctly in WSL

wlxer opened this issue · 2 comments

Hi, I installed ubuntu version 20.04 on windows 11pro using wsl2. And ready to use ubuntu20.04 through windows terminal. My bash version is 5.0.17. Recently I wanted to install nnn with nerdfont in ubuntu. so I executed the following command under $home directory:

git clone --depth 1 https://github.com/jarun/nnn
cd nnn
sudo make O_NERD=1
sudo cp nnn /usr/bin

The whole compiling process was smooth.
image
By executing the already compiled file ‘./nnn’, it is also able to display icon for folders and such:
image

But I found that the icon didn't appear when I direcly use the command 'nnn':
image

By the way, I have installed the following four mesloLG NF mono FONT in my Windows11
image
and modified the relative setting.json file of windows terminal:
image
The display of fonts is really not a problem, but I do still have problems with displaying the icon using nnn, which makes me confused.

--- PLEASE DELETE THIS LINE AND EVERYTHING ABOVE ---

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

  • Operating System: windows11pro 22H2 and WSL2 with Ubuntu 20.04
  • Desktop Environment:
  • Terminal Emulator: windows terminal
  • Shell: bash 5.0.17
  • Custom desktop opener (if applicable):
  • Program options used: O_NERD = 1
  • Configuration options set:
  • Plugins are installed
  • Issue exists on nnn master

Exact steps to reproduce the issue

But I found that the icon didn't appear when I direcly use the command 'nnn':

Post the output of which nnn. It's likely invoking the old binary and not the new one.

sudo make O_NERD=1

You shouldn't need sudo for compiling. It's only needed for install.

sudo cp nnn /usr/bin

Why not use sudo make install instead of manually copying?

But I found that the icon didn't appear when I direcly use the command 'nnn':

Post the output of which nnn. It's likely invoking the old binary and not the new one.

which nnn turns out to be:
image

sudo make O_NERD=1

You shouldn't need sudo for compiling. It's only needed for install.

sudo cp nnn /usr/bin

Why not use sudo make install instead of manually copying?

I figured out what the problem was, it was indeed that the nnn packages that had been installed by ‘apt-get install’ before were not removed correctly. Thanks for your comments! I will close this issue.