EESSI / compatibility-layer

Compatibility layer of the EESSI project
https://eessi.github.io/docs/compatibility_layer
GNU General Public License v2.0
12 stars 21 forks source link

bash: eval: line 32: syntax error near unexpected token `newline' #14

Open JvD007 opened 4 years ago

JvD007 commented 4 years ago

When you enter the login bash of Gentoo prefix under ubuntu, you see the following error message:

bash: eval: line 32: syntax error near unexpected token newline' bash: eval: line 32:Usage: lesspipe '

Checked because ubuntu .bashrc contains the following command by default:

make less more friendly for non-text input files, see lesspipe(1)

[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

The ubuntu under lesspipe parameterless runtime outputs environment variable configurations such as LESSOPEN, while the lesspipe under gentoo does not support parameter-free runs, so the output is misstated. The solution is to modify the above command to explicitly call the lesspipe command under ubuntu using the full path, as follows (or comment this line directly out of the line?). )。

[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh /usr/bin/lesspipe)"

Gentoo Prefix issue?

amadio commented 2 years ago

In Gentoo, eval $(lesspipe) is not necessary. The lesspipe utility is not the same in Gentoo and Ubuntu. Just export LESSCOLOR=always on Gentoo and it should be enough.