Skip to content

Commit

Permalink
Bug fixed --sign option.
Browse files Browse the repository at this point in the history
* Updated tests with sign option support.
  • Loading branch information
wulfgarpro committed May 7, 2022
1 parent 85baf12 commit e66cc5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions history-sync.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ function history_sync_push() {
else
sign='y'
fi
fi

if [[ -n "$sign" ]]; then
case "$sign" in
[Yy]* )
ENCRYPT_CMD+="--sign "
Expand Down
4 changes: 2 additions & 2 deletions test/test.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ info "TEST SYNC HISTORY BASIC 0"
setup
RAND=$RANDOM
echo "1 echo $RAND" >> ~/.zsh_history
echo "$UID" | zhps -y && zhpl -y
zhps -y -r $UID && zhpl -y
check_history "^1 echo $RAND$"
success "SUCCESS"

Expand All @@ -94,7 +94,7 @@ echo "2 echo $RAND1" >> ~/.zsh_history
echo "3 echo $RAND2" >> ~/.zsh_history
echo "4 echo $RAND3" >> ~/.zsh_history
echo "5 echo $RAND4" >> ~/.zsh_history
zhps -y -r $UID && zhpl -y
zhps -y -r $UID -s $UID && zhpl -y
check_history "^1 echo $RAND0$"
check_history "^2 echo $RAND1$"
check_history "^3 echo $RAND2$"
Expand Down

0 comments on commit e66cc5a

Please sign in to comment.