fix(unix): use sed instead of tail for bash and zsh default history channels (#216)

Fixes #215
This commit is contained in:
Alex Pasmantier 2025-01-05 00:29:10 +01:00 committed by GitHub
parent 124c06c403
commit 3e5f0a44a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'"