mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 21:39:48 +01:00
global zsh config
This commit is contained in:
parent
76dd2d8b05
commit
d15d3a5b01
1 changed files with 4 additions and 3 deletions
|
@ -20,18 +20,19 @@ function noyes() {
|
|||
|
||||
function theme_preview() {
|
||||
THEME=$1
|
||||
THEME_NAME=`echo $THEME | sed s/\.zsh-theme//`
|
||||
export ZDOTDIR="$(mktemp -d tmp.zshXXXX)"
|
||||
|
||||
cat <<-EOF >"$ZDOTDIR/.zshrc"
|
||||
source ~/.zshrc
|
||||
source "$THEMES_DIR/$THEME"
|
||||
ZSH_THEME="$THEME_NAME"
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
EOF
|
||||
zsh
|
||||
rm -rf "$ZDOTDIR"
|
||||
|
||||
echo
|
||||
noyes "Do you want to add it to your favourite list ($FAVLIST)?" || \
|
||||
echo $THEME >> $FAVLIST
|
||||
echo $THEME_NAME >> $FAVLIST
|
||||
echo
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue