From 00791716bb4c215329ddf7273c031e2a976ed543 Mon Sep 17 00:00:00 2001 From: alexpasmantier Date: Sun, 5 Jan 2025 00:24:27 +0100 Subject: [PATCH] fix(unix): use sed instead of tail for bash and zsh default history channels --- cable/unix-channels.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cable/unix-channels.toml b/cable/unix-channels.toml index c343a1d..572e464 100644 --- a/cable/unix-channels.toml +++ b/cable/unix-channels.toml @@ -35,13 +35,12 @@ preview_command = ":files:" # Shell history [[cable_channel]] name = "zsh-history" -source_command = "tail -r $HISTFILE | cut -d\";\" -f 2-" +source_command = "sed '1!G;h;$!d' $HISTFILE | cut -d\";\" -f 2-" [[cable_channel]] name = "bash-history" -source_command = "tail -r $HISTFILE" +source_command = "sed '1!G;h;$!d' $HISTFILE" [[cable_channel]] name = "fish-history" source_command = "fish -c 'history'" -