upterm icon indicating copy to clipboard operation
upterm copied to clipboard

Sourcing ~/.zshrc messes up everything

Open HaraldNordgren opened this issue 8 years ago • 5 comments

I have a bunch of config in my .zshrc. Appending to the PATH, setting up virtualenvwrapper, kubectl completion. But running source ~/.zshrc messes up the whole terminal in Black Screen:

$ source ~/.zshrc $ ls Black Screen: command "ls" not found. $ echo hello Black Screen: command "echo" not found. $ vim ~/.zshrc Black Screen: command "vim" not found.

My settings all work fine in iTerm2.

HaraldNordgren avatar Jan 30 '17 10:01 HaraldNordgren

Can you include a copy of your .zshrc here?

drew-gross avatar Jan 30 '17 18:01 drew-gross

Yup, here it is:

ZSH_THEME=peepcode
HYPHEN_INSENSITIVE="true"


#export ZSH=/Users/harald/git-repos/oh-my-zsh
export ZSH=/Users/harald/workspace/github/oh-my-zsh
plugins=(git colored-man-pages history jsontools python docker-compose docker-machine)

alias ls='ls -G'
alias o='open .'

function c {
    osascript -e 'tell application "System Events" to keystroke "k" using command down'
}


#export PATH=$PATH:~/git-repos/my-configuration/git-scripts
export PATH=$PATH:/Users/harald/workspace/github/my-configuration/git-scripts

source $ZSH/oh-my-zsh.sh

function mkcd { mkdir -p "$1" && cd "$1" }
function unzipd { unzip $1 -d ${1%.zip} }

alias grep='grep --color=auto'
alias igrep='grep -rI'
alias ind="sed 's/^/  /'"
alias hst='history | grep'
alias ll='ls -alF'
alias pp='python -m json.tool' 
alias s='sudo'
alias v="vim -p"
alias l='less'

unalias gsr


setopt no_share_history
setopt rm_star_silent

source <(kubectl completion zsh)

export WORKON_HOME=~/Envs
export VIRTUALENVWRAPPER_PYTHON=$(which python3)
source /usr/local/bin/virtualenvwrapper.sh

eval "$(pyenv init -)"

export LC_ALL=en_US.UTF-8

HaraldNordgren avatar Jan 31 '17 12:01 HaraldNordgren

Something is definitely up:

% PATH=$PATH
Black Screen: command "$PATH" not found.

HaraldNordgren avatar Jan 31 '17 13:01 HaraldNordgren

I'm having the same issue on MacOS 10.12.3 / zsh 5.3.1. Sourcing any file seems to bork everything.

Example:

> ls
(success)
> source ~/.cargo/env
(no output)
> ls
Black Screen: command "ls" not found.

If I open a new BS tab everything works for the new tab until I source a file.

turnspike avatar Mar 05 '17 05:03 turnspike

+1

a-eid avatar Jul 02 '17 19:07 a-eid