From d0f6ef240e8d1b647fc6237b959bcb5695d3361e Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Wed, 1 Feb 2023 21:03:49 +0800 Subject: [PATCH] remove ^M in hist --- tools/append_zsh_hist.sh | 2 +- tools/test.zsh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/append_zsh_hist.sh b/tools/append_zsh_hist.sh index ce7d767..fafac96 100755 --- a/tools/append_zsh_hist.sh +++ b/tools/append_zsh_hist.sh @@ -26,7 +26,7 @@ main() if [[ -z "$k" ]]; then continue fi - (curl -fsSL "https://pastebin.com/raw/$k" && echo) | do_append + (curl -fsSL "https://pastebin.com/raw/$k" && echo) | sed 's/\r//' | do_append done } diff --git a/tools/test.zsh b/tools/test.zsh index 5658697..6111f08 100644 --- a/tools/test.zsh +++ b/tools/test.zsh @@ -49,9 +49,9 @@ git reset --hard $DFS_VERSION # then check install.sh ./install.sh -dx DFS_CI=1 -H e153a2eL,f8At3iFw -grep -q "testhist 1" ~/.zsh_history -grep -q "testhist 4" ~/.zsh_history -grep -q "DFS_CI=1" ~/.config/dotfiles/env +grep -qx "testhist 1" ~/.zsh_history +grep -qx "testhist 4" ~/.zsh_history +grep -qx "DFS_CI=1" ~/.config/dotfiles/env ./install.sh -l -x DFS_CI=1 dfs version test `git rev-parse HEAD` = `curl -fsSL https://api.beardic.cn/get-var/dfs-commit-id`