We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8932f16 commit 491085bCopy full SHA for 491085b
history-sync.plugin.zsh
@@ -151,6 +151,21 @@ function history_sync_pull() {
151
cp -av "$ZSH_HISTORY_FILE" "$ZSH_HISTORY_FILE.backup" 1>&2
152
fi
153
154
+
155
+ # Clone if not exist
156
+ if [[ ! -d "$ZSH_HISTORY_PROJ" ]]; then
157
+ if [[ ! -v ZSH_HISTORY_GIT_REMOTE ]]; then
158
+ _print_git_error_msg
159
+ return
160
+ fi
161
162
+ "$GIT" clone "$ZSH_HISTORY_GIT_REMOTE" "$ZSH_HISTORY_PROJ"
163
+ if [[ "$?" != 0 ]]; then
164
165
166
167
168
169
# Pull
170
cd "$ZSH_HISTORY_PROJ" && "$GIT" pull
171
if [[ "$?" != 0 ]]; then
0 commit comments