I found a theme I like but only after executing a program on the command line with a lot of output, so I don't know the name of the current theme!
Here is the relevant part of my .zshrc:
# Set name of the theme to load. ... ZSH_THEME="random"
Is there a way to determine which theme I am on?
You can use prompt -c which will print the current theme.
You can browse all the “Oh My ZSH” Themes here. To change the Theme, simply change the ZSH_THEME value in ~/. zshrc file from robbyrussell to Avit.
It is the most popular framework for managing Zsh configuration, plugins, and themes. It will help you transition from using your current shell to Zsh in the easiest way possible. Although Oh My Zsh can do many other things, it is the most famous for its ability to easily manage a ton of themes and plugins.
According to oh-my-zsh.sh
L81-87:
if [ "$ZSH_THEME" = "random" ]; then themes=($ZSH/themes/*zsh-theme) N=${#themes[@]} ((N=(RANDOM%N)+1)) RANDOM_THEME=${themes[$N]} source "$RANDOM_THEME" echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
Therefore you should be able to print the path to the random theme with
print $RANDOM_THEME
As it was requested to its developers team, a new command is added to support this functionality:
just use:
echo $ZSH_THEME
the response will be the current theme which is using by user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With