Re: Add to $PATH how?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06Jun2006 08:54, Steven W. Orr <steveo@xxxxxxxxxxx> wrote:
| Be aware that ssh starts a login shell except if you are running a 
| specific command. e.g., ssh foo is a login shell, but ssh foo pwd is not. 
| So the correct thing to do is to set your PATH in you .bash_profile and to 
| also set it in your .bashrc IF YOU ARE NOT INTERACTIVE. Test if you're 
| interactive in your .bashrc by looking if $PS1 is null.
| 
| if [[ -z "$PS1" ]]
| then
| 	# Set aliases here
| else
| 	# Set PATH here
| fi

God, NO.

That's what the RedHat bashrc do. It's very wrong. Test for an "i" in
the $- variable. People used to just set $PS1 and export it. Worked just
fine - happened in your .profile and all was good.

I had to _stop_ doing that because the idiots at RedHat expect $PS1 to
be set only in interactive shells (circularly, because they expect it to
be set in the bashrc...). It is false logic, and routinely trashed my
setups.

Test $-, and ignore $PS1.

Of course, one of the first things we do in our standard installs at
work is to discard the /etc/bashrc supplied by RH completely. It's
very dodgy.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Top executives cannot afford to be isolated from the people below, who are in
better touch with what is going on, and cannot afford to set unrealistic
goals.  - Charles Burck

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux