mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 14:57:00 +08:00
fix zsh hist with no new line at the end
This commit is contained in:
parent
d493ad9e2d
commit
81e83ab956
|
@ -9,7 +9,9 @@ do_append()
|
|||
{
|
||||
timestamp=$(date +%s)
|
||||
while read -r line; do
|
||||
if [[ -n "$line" ]]; then
|
||||
echo ": $timestamp:0;$line" >> "$zsh_hist_file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -24,7 +26,7 @@ main()
|
|||
if [[ -z "$k" ]]; then
|
||||
continue
|
||||
fi
|
||||
curl -fsSL "https://pastebin.com/raw/$k" | do_append
|
||||
(curl -fsSL "https://pastebin.com/raw/$k" && echo) | do_append
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user