mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 17:06:58 +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)
|
timestamp=$(date +%s)
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
echo ": $timestamp:0;$line" >> "$zsh_hist_file"
|
if [[ -n "$line" ]]; then
|
||||||
|
echo ": $timestamp:0;$line" >> "$zsh_hist_file"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +26,7 @@ main()
|
||||||
if [[ -z "$k" ]]; then
|
if [[ -z "$k" ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
curl -fsSL "https://pastebin.com/raw/$k" | do_append
|
(curl -fsSL "https://pastebin.com/raw/$k" && echo) | do_append
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user