llama-gpt icon indicating copy to clipboard operation
llama-gpt copied to clipboard

zsh syntax highlighting error

Open mberman84 opened this issue 1 year ago • 3 comments

i'm getting an error trying to run the model. looks like one of my iterm plugins is causing it. however, even after removing it I still get the same issue.

(base) ➜  llama-gpt git:(master) ./run-mac.sh --model 13b
/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh: line 31: alias: -L: invalid option
alias: usage: alias [-p] [name[=value] ... ]
/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh: line 36: unalias: -m: invalid option
unalias: usage: unalias [-a] name [name ...]

mberman84 avatar Aug 22 '23 15:08 mberman84

By GPT-4

The error messages you're seeing are coming from the zsh-syntax-highlighting plugin for Zsh, which is intended to provide syntax highlighting for your shell.

The error messages indicate that the -L option for the alias command and -m option for the unalias command are not recognized. These options are typically used in Bash, not Zsh.

This suggests that there might be a conflict between your Zsh configuration and the run-mac.sh script you're trying to run.

Here are a few things you can try to resolve these errors:

  1. Comment out or remove the lines in your .zshrc file that source the zsh-syntax-highlighting.zsh script, then open a new terminal window and try to run the script again.

  2. If you don't want to disable zsh-syntax-highlighting entirely, you can try to temporarily disable it in your current shell before running the script:

    unfunction zsh-syntax-highlighting
    ./run-mac.sh --model 13b
    
  3. If the above methods don't work, you might want to try running the script in a Bash shell instead of Zsh:

    bash run-mac.sh --model 13b
    

Remember to backup your .zshrc file before making any changes to it, so you can restore your original configuration if necessary.

lityrdef avatar Aug 22 '23 18:08 lityrdef

I tried removing all mention of zsh-syntax-highlighting and then started getting another error: /Users/matthewberman/.oh-my-zsh/oh-my-zsh.sh: line 23: autoload: command not found

mberman84 avatar Aug 23 '23 16:08 mberman84

@mberman84 can you try

zsh run-mac.sh --model 13b

lukechilds avatar Sep 04 '23 13:09 lukechilds