Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18614 - setting EDITOR in /etc/profile
Summary: setting EDITOR in /etc/profile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-01 18:45 UTC by Aron Griffis (RETIRED)
Modified: 2003-04-06 11:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Griffis (RETIRED) gentoo-dev 2003-04-01 18:45:29 UTC
It seems kinda silly to go through such acrobatics in /etc/profile to get
EDITOR.  In particular, I think it would be nice to avoid calling gawk for every
login shell!  Here's a much shorter method for doing the same thing...

# Extract the value of EDITOR
[ -z "$EDITOR" ] && EDITOR=`. /etc/rc.conf; echo $EDITOR` 2>/dev/null
[ -z "$EDITOR" ] && EDITOR=`. /etc/conf.d/basic; echo $EDITOR` 2>/dev/null
[ -z "$EDITOR" ] && EDITOR=/bin/nano
export EDITOR
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-04-06 11:40:04 UTC
In CVS in a bit, thanks!