From 533775dfe3a8467bf8eabc332ad9f22501c81809 Mon Sep 17 00:00:00 2001 From: Viktor Varland Date: Mon, 16 Feb 2026 19:48:33 +0100 Subject: [PATCH] docs: update readme --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b4efeaa..756a322 100644 --- a/README.md +++ b/README.md @@ -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="$(