railsware / upterm

A terminal emulator for the 21st century.
MIT License
19.24k stars 617 forks source link

Sourcing ~/.zshrc messes up everything #961

Open HaraldNordgren opened 7 years ago

HaraldNordgren commented 7 years ago

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.

drew-gross commented 7 years ago

Can you include a copy of your .zshrc here?

HaraldNordgren commented 7 years ago

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 commented 7 years ago

Something is definitely up:

% PATH=$PATH
Black Screen: command "$PATH" not found.
turnspike commented 7 years ago

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.

a-eid commented 7 years ago

+1