Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
d15d3a5b
Commit
d15d3a5b
authored
Jul 24, 2011
by
fox
Browse files
global zsh config
parent
76dd2d8b
Changes
1
Show whitespace changes
Inline
Side-by-side
tools/theme_chooser.sh
View file @
d15d3a5b
...
@@ -20,18 +20,19 @@ function noyes() {
...
@@ -20,18 +20,19 @@ function noyes() {
function
theme_preview
()
{
function
theme_preview
()
{
THEME
=
$1
THEME
=
$1
THEME_NAME
=
`
echo
$THEME
|
sed
s/
\.
zsh-theme//
`
export
ZDOTDIR
=
"
$(
mktemp
-d
tmp.zshXXXX
)
"
export
ZDOTDIR
=
"
$(
mktemp
-d
tmp.zshXXXX
)
"
cat
<<-
EOF
>"
$ZDOTDIR
/.zshrc"
cat
<<-
EOF
>"
$ZDOTDIR
/.zshrc"
source ~/.zshrc
ZSH_THEME="
$THEME_NAME
"
source
"
$THEMES_DIR
/
$THEME
"
source
$ZSH
/oh-my-zsh.sh
EOF
EOF
zsh
zsh
rm
-rf
"
$ZDOTDIR
"
rm
-rf
"
$ZDOTDIR
"
echo
echo
noyes
"Do you want to add it to your favourite list (
$FAVLIST
)?"
||
\
noyes
"Do you want to add it to your favourite list (
$FAVLIST
)?"
||
\
echo
$THEME
>>
$FAVLIST
echo
$THEME
_NAME
>>
$FAVLIST
echo
echo
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment