Skip to content

Instantly share code, notes, and snippets.

@emotality
Last active September 24, 2023 20:17
Show Gist options
  • Save emotality/7439d00290095d9c1e995310d70bf692 to your computer and use it in GitHub Desktop.
Save emotality/7439d00290095d9c1e995310d70bf692 to your computer and use it in GitHub Desktop.
Oh My Zsh with Jovial

Oh My Zsh with Jovial on macOS

Oh My Zsh bash with the Jovial theme

omz-jovial.png

Steps

If you don't have Homebrew, install it:

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install the latest zsh

$ brew install zsh zsh-completions

Verify installation

$ zsh --version

Install the latest Oh My Zsh

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Save Jovial theme to your OMZ themes directory

$ echo -E "$(curl -fsSL https://raw.githubusercontent.com/zthxxx/jovial/master/jovial.zsh-theme)" > ~/.oh-my-zsh/themes/jovial.zsh-theme

Configure OMZ

$ nano ~/.zshrc

Change theme to jovial and add urltools to your plugins

ZSH_THEME="jovial"

plugins=(
  git
  urltools
)

Make OMZ your default bash

$ chsh -s $(which zsh)

Note: This will not work if Zsh is not in your authorized shells list (/etc/shells) or if you don't have permission to use chsh. If that's the case you'll need to use a different procedure.

Done! Reopen your Terminal window 😎

@dijorajsenroy
Copy link

can you help me out with this error:

regexp-replace:28: failed to load module zsh/pcre': dlopen(/usr/lib/zsh/5.3/zsh/pcre.so, 9): image not found regexp-replace:28: -pcre-match not available for regex regexp-replace:28: failed to load module zsh/pcre': dlopen(/usr/lib/zsh/5.3/zsh/pcre.so, 9): image not found
regexp-replace:28: -pcre-match not available for regex
regexp-replace:28: failed to load module zsh/pcre': dlopen(/usr/lib/zsh/5.3/zsh/pcre.so, 9): image not found regexp-replace:28: -pcre-match not available for regex regexp-replace:28: failed to load module zsh/pcre': dlopen(/usr/lib/zsh/5.3/zsh/pcre.so, 9): image not found
regexp-replace:28: -pcre-match not available for regex

@emotality
Copy link
Author

can you help me out with this error:

regexp-replace:28: failed to load module zsh/pcre': dlopen(/usr/lib/zsh/5.3/zsh/pcre.so, 9): image not found regexp-replace:28: -pcre-match not available for regex regexp-replace:28: failed to load module zsh/pcre': dlopen(/usr/lib/zsh/5.3/zsh/pcre.so, 9): image not found
regexp-replace:28: -pcre-match not available for regex
regexp-replace:28: failed to load module zsh/pcre': dlopen(/usr/lib/zsh/5.3/zsh/pcre.so, 9): image not found regexp-replace:28: -pcre-match not available for regex regexp-replace:28: failed to load module zsh/pcre': dlopen(/usr/lib/zsh/5.3/zsh/pcre.so, 9): image not found
regexp-replace:28: -pcre-match not available for regex

Hi @dijorajsenroy πŸ˜ƒ

This looks like an issue with ZSH itself. I would uninstall oh-my-zsh, then uninstall zsh, then delete their folders, then do a fresh install.

That's my opinion but I'm no expert. Maybe ask @zthxxx he's an expert πŸ˜‰
(https://github.com/zthxxx/jovial)

@zthxxx
Copy link

zthxxx commented Jun 15, 2020

Hello @dijorajsenroy,

I noticed that some pcre errors will be occur in zsh,

it looks like you should try install pcre module, maybe brew install pcre if you use brew

@matteobovetti
Copy link

Same error!
I have made a fresh installation of ZSH and oh-my-zsh, but I face the error again.

@zthxxx
Copy link

zthxxx commented Oct 23, 2020

@matteobovetti
Copy link

Thanks! It works!

@qwqcode
Copy link

qwqcode commented Aug 20, 2022

Hi @emotality 😁

Thanks for your great work

I noticed an error message when I cd to a node project folder and followed this clue to do some research

image

@jov.prompt-node-version:5: command not found: ode

After then, I found that this step may be wrong and needs to be fixed: πŸ˜ƒ

echo "$(curl -fsSL https://raw.githubusercontent.com/zthxxx/jovial/master/jovial.zsh-theme)" > ~/.oh-my-zsh/themes/jovial.zsh-theme

SHOULD BE:

echo -E "$(curl -fsSL https://raw.githubusercontent.com/zthxxx/jovial/master/jovial.zsh-theme)" > ~/.oh-my-zsh/themes/jovial.zsh-theme

add the -E flag to prevent the newline characters \n from being escaped in the jovial.zsh-theme script file.


diff no-E.sh E.sh

<             local node_prompt="%F{120}node `
< ode -v`"
---
>             local node_prompt="%F{120}node `\node -v`"
630,631c628

@emotality
Copy link
Author

Hi @qwqcode 😊

This is @zthxxx 's awesome work, you should open an issue on his jovial repo if you're having issues ✌🏻☺️

@qwqcode
Copy link

qwqcode commented Aug 22, 2022

@emotality Sorry for my unclear description, I was referring to the step in this gist of yours πŸ˜„

Save Jovial theme to your OMZ themes directory
echo "$(curl -fsSL https://raw.githubusercontent.com/zthxxx/jovial/master/jovial.zsh-theme)" > ~/.oh-my-zsh/themes/jovial.zsh-theme

this step should add the -E flag to prevent the newline characters \n from being escaped in the downloaded jovial.zsh-theme script file.

@emotality
Copy link
Author

@qwqcode Oh snap sorry didn't read the full message from my phone πŸ€¦πŸ»β€β™‚οΈπŸ˜…

Thanks for that, but this is quite old, think zthxxx's one line command will install it all, no?

curl -sSL https://github.com/zthxxx/jovial/raw/master/installer.sh | sudo -E bash -s $USER`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment