/etc/skel/.bashrc - lesspipe problem
Bug #58103 reported by
Hadmut Danisch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
less (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
Binary package hint: bash
Hi,
there's a bug in /etc/skel/.bashrc:
It calls the program lesspipe and evals it's output.
But the syntax of the environment commands that lesspipe spits out
depends on the SHELL environment variable.
Thus, if a user has a SHELL variable other than any sh dialect,
(e.g. tcsh), and runs bash, lesspipe issues csh-compatible commands
which are incompatible to sh. It fails to work and issues annoying
error messages.
replace
eval "$(lesspipe)"
with
eval "$(env SHELL=/bin/sh lesspipe)"
regards
Hadmut
Bash sets $SHELL -- if you set it to something else manuyally you'll
surely get more errors than this...