docs: update readme

This commit is contained in:
Viktor Varland 2026-02-16 19:48:33 +01:00
parent d62beed23f
commit 533775dfe3
No known key found for this signature in database
GPG key ID: 991E991EBEC46432

View file

@ -34,7 +34,7 @@ _add_history() {
local cmd=$(fc -ln -1)
cmd=${cmd//$'\n'/\\n}
shist add \
--timestamp "$(date --utc --iso-8601=seconds)" \
--timestamp "$(date -u +%Y-%m-%dT%H:%M:%S+00:00)" \
--hostname "$(hostname)" \
--dir "$(pwd)" \
-- "$cmd"
@ -46,10 +46,14 @@ hsup() { shist sync "$histdb_dir" }
hs() {
local copy_cmd=
case "$XDG_SESSION_TYPE" in
x11) copy_cmd="xsel --clipboard" ;;
wayland) copy_cmd="wl-copy --trim-newline" ;;
*) echo "Session type not detected."; return ;;
case "$(uname -s)" in
Darwin) copy_cmd="pbcopy" ;;
*)
case "$XDG_SESSION_TYPE" in
x11) copy_cmd="xsel --clipboard" ;;
wayland) copy_cmd="wl-copy --trim-newline" ;;
*) echo "Session type not detected."; return ;;
esac ;;
esac
local entry="$(