Adding a directory to a path in .zshrc

I have been dealing with this issue for a couple of days. I am using zsh and you need to set the directory path so that the recognized command is recognized. After these steps:

 cd ~ ls -al 

ls -al shows me the following files:

 .oh-my-zsh .profile .putty .rediscli_history .ringo-history .ssh .subversion .viminfo .zcompdump .zsh-update .zsh_history .zshrc 

I assume I need to add the path to .zshrc , therefore:

 open -e .zshrc 

At the end of the file, I added the path to the command that I will use to install my project (using ringojs):

 export PATH=Users/repos/ringojs/bin/:$PATH 

Close the file, restart the terminal application, restart the computer, however the command ( ringo-admin ) located on the path above ( /Users/repos/ringojs/bin ) was not found:

 ringo-admin create --google-appengine MyAppName zsh: command not found: ringo-admin 

Please help me with this if this helps, here is my .zshrc content:

 # Path to your oh-my-zsh configuration. ZSH=$HOME/.oh-my-zsh # Set name of the theme to load. # Look in ~/.oh-my-zsh/themes/ # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. ZSH_THEME="robbyrussell" # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" # Set to this to use case-sensitive completion # CASE_SENSITIVE="true" # Comment this out to disable bi-weekly auto-update checks # DISABLE_AUTO_UPDATE="true" # Uncomment to change how many often would you like to wait before auto-updates occur? (in days) # export UPDATE_ZSH_DAYS=13 # Uncomment following line if you want to disable colors in ls # DISABLE_LS_COLORS="true" # Uncomment following line if you want to disable autosetting terminal title. # DISABLE_AUTO_TITLE="true" # Uncomment following line if you want red dots to be displayed while waiting for completion # COMPLETION_WAITING_DOTS="true" # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) plugins=(git) source $ZSH/oh-my-zsh.sh # Customize to your needs... export PATH=Users/repos/ringojs/bin/ringo-admin:$PATH 

Please guide me step by step as I am new to zsh . Thanx.

UPDATE:

echo $ PATH displays me a newly added directory:

 /Users/repos/ringojs/bin/ringo-admin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin 

I do not understand why the team is not always found.

+4
source share
1 answer

You are missing a leading slash. Try:

 export PATH=/Users/repos/ringojs/bin/:$PATH 
+7
source

All Articles