Neither bash nor zsh are setting my path to ~/bin [SOLVED]

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Neither bash nor zsh are setting my path to ~/bin [SOLVED]

Postby graysky » Sat Aug 09, 2014 5:43 pm

Never seen this before. I have this line in my ~/.bashrc or in my ~/.zshrc but neither shell actually sets my path:
$this->bbcode_second_pass_code('', 'PATH=$PATH:$HOME/bin:/opt/vc/bin')

If I ssh into my rpbox:
$this->bbcode_second_pass_code('', '% echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl
')

Ideas?
Last edited by graysky on Sun Aug 10, 2014 5:10 pm, edited 1 time in total.
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Neither bash nor zsh are setting my path to ~/bin

Postby sdjf » Sun Aug 10, 2014 4:31 am

What is in $HOME?

Why don't you just set the path to what you want, without using variables, and see if that works?

Also, your path had better include /usr/bin because that is where all the binaries in Arch are now.

This is bringing back memories - I had to declare my PATH in .profile, do you have a .profile file?

And .profile needs to be sourced in .bash_profile. You .bashrc might not even be recognized if you do not also source it in .bash_profile, I do not know about zsh. Those periods at the start of each line "source" the files shown after on the same lines.
$this->bbcode_second_pass_code('', '
# cat .bash_profile
. ~/.bashrc
. ~/.profile
')
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: Neither bash nor zsh are setting my path to ~/bin

Postby graysky » Sun Aug 10, 2014 5:10 pm

I am so stupid. In my ~/.zshrc I sourced/etc/profile after my PATH statement. Moving the PATH below it solved the mystery.

$this->bbcode_second_pass_code('', '# ~/.zshrc
# works in conjunction with extra/grml-zsh-config
#

# general setup stuff
echo -e "\x1B]2;$(whoami)@$(uname -n)\x07";
bindkey -v

prompt adam1 magenta
[[ -z "$PS1" ]] && return
[[ -f /etc/profile ]] && . /etc/profile

# default grml config takes precedence over autojump
[[ -f /etc/zsh/zshrc ]] && unalias j
TERM=xterm-256color
PATH=$PATH:$HOME/bin:/opt/vc/bin
...')
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 31 guests