tarjoilija / zgen

A lightweight and simple plugin manager for ZSH
BSD 2-Clause "Simplified" License
1.49k stars 98 forks source link

Can't source zgen #127

Closed espenol closed 4 years ago

espenol commented 4 years ago

When I start zsh, I get the following error messages:

/home/espenol/.zshrc:1: command not found:  source
/home/espenol/.zshrc:4: command not found: zgen
/home/espenol/.zshrc:7: command not found: zgen
/home/espenol/.zshrc:10: command not found: zgen

My first guess would be that my PATH variable is messed up, but if I in the shell write which source it returns source: shell built-in command, so it obviously finds the command. Also, if I insert the comment # Load zgen as the first line of .zshrc, I instead get the error message

/home/espenol/.zshrc:1: command not found:  #

Any clue as to what is happening and how I can fix this issue? I'd like to try out some plugins. Runnig zsh 5.7.

My .zshrc is as follows:

source "${HOME}/.zgen/zgen.zsh"

# if the init script doesn't exist
if ! zgen saved; then

  # specify plugins here
  zgen oh-my-zsh

  # generate the init script from plugins above
  zgen save
fi

Apologies if this is not the correct place to ask.

espenol commented 4 years ago

It was of course because of BOM settings, stupid me. Using :set nobomb in vim solved the issue.