File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ USER $USERNAME
23
23
# RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.0.2/zsh-in-docker.sh)" -- \
24
24
COPY zsh-in-docker.sh /tmp
25
25
RUN /tmp/zsh-in-docker.sh \
26
+ -t https://github.com/denysdovhan/spaceship-prompt \
27
+ -a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \
28
+ -a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \
26
29
-p git \
27
30
-p https://github.com/zsh-users/zsh-autosuggestions \
28
31
-p https://github.com/zsh-users/zsh-completions \
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ test_suite() {
15
15
docker-compose up -d test-$image_name
16
16
docker cp zsh-in-docker.sh zsh-in-docker_test-${image_name} _1:/tmp
17
17
docker exec zsh-in-docker_test-${image_name} _1 sh /tmp/zsh-in-docker.sh \
18
- -t agnoster \
18
+ -t https://github.com/denysdovhan/spaceship-prompt \
19
19
-p git -p git-auto-fetch \
20
20
-p https://github.com/zsh-users/zsh-autosuggestions \
21
21
-p https://github.com/zsh-users/zsh-completions \
@@ -31,7 +31,7 @@ test_suite() {
31
31
echo " ########################################################################################"
32
32
echo " Test: zsh 5 was installed" && assert_contain " $VERSION " " zsh 5" " !"
33
33
echo " Test: ~/.zshrc was generated" && assert_contain " $ZSHRC " ' ZSH="/root/.oh-my-zsh"' " !"
34
- echo " Test: theme was configured" && assert_contain " $ZSHRC " ' ZSH_THEME="agnoster "' " !"
34
+ echo " Test: theme was configured" && assert_contain " $ZSHRC " ' ZSH_THEME="spaceship-prompt/spaceship "' " !"
35
35
echo " Test: plugins were configured" && assert_contain " $ZSHRC " ' plugins=(git git-auto-fetch zsh-autosuggestions zsh-completions )' " !"
36
36
echo " Test: line 1 is appended to ~/.zshrc" && assert_contain " $ZSHRC " ' CASE_SENSITIVE="true"' " !"
37
37
echo " Test: line 2 is appended to ~/.zshrc" && assert_contain " $ZSHRC " ' HYPHEN_INSENSITIVE="true"' " !"
Original file line number Diff line number Diff line change @@ -100,9 +100,9 @@ export ZSH="$_HOME/.oh-my-zsh"
100
100
ZSH_THEME="${_THEME} "
101
101
plugins=($_PLUGINS )
102
102
103
- source \$ ZSH/oh-my-zsh.sh
104
103
EOM
105
104
printf " $ZSHRC_APPEND "
105
+ printf " \nsource \$ ZSH/oh-my-zsh.sh"
106
106
}
107
107
108
108
powerline10k_config () {
@@ -136,6 +136,16 @@ for plugin in $PLUGINS; do
136
136
plugin_list=" ${plugin_list} $plugin_name "
137
137
done
138
138
139
+ # Handle themes
140
+ if [ " ` echo $THEME | grep -E ' ^http.*' ` " != " " ]; then
141
+ theme_repo=` basename $THEME `
142
+ THEME_DIR=" $HOME /.oh-my-zsh/custom/themes/$theme_repo "
143
+ git clone $THEME $THEME_DIR
144
+ theme_name=` cd $THEME_DIR ; ls * .zsh-theme | head -1`
145
+ theme_name=" ${theme_name% .zsh-theme} "
146
+ THEME=" $theme_repo /$theme_name "
147
+ fi
148
+
139
149
# Generate .zshrc
140
150
zshrc_template " $HOME " " $THEME " " $plugin_list " > $HOME /.zshrc
141
151
You can’t perform that action at this time.
0 commit comments