stop using sed to reverse files

it is extremely slow for large history files
This commit is contained in:
Jesse Luehrs 2025-01-26 18:21:49 -05:00
parent 53c4bd3f09
commit 6456f50709
2 changed files with 4 additions and 4 deletions

View File

@ -45,11 +45,11 @@ preview_command = ":files:"
# Shell history
[[cable_channel]]
name = "zsh-history"
source_command = "sed '1!G;h;$!d' $HOME/.zsh_history | cut -d\";\" -f 2-"
source_command = "tail -r $HOME/.zsh_history | cut -d\";\" -f 2-"
[[cable_channel]]
name = "bash-history"
source_command = "sed '1!G;h;$!d' $HOME/.bash_history"
source_command = "tail -r $HOME/.bash_history"
[[cable_channel]]
name = "fish-history"

View File

@ -45,11 +45,11 @@ preview_command = ":files:"
# Shell history
[[cable_channel]]
name = "zsh-history"
source_command = "sed '1!G;h;$!d' $HOME/.zsh_history | cut -d\";\" -f 2-"
source_command = "tac $HOME/.zsh_history | cut -d\";\" -f 2-"
[[cable_channel]]
name = "bash-history"
source_command = "sed '1!G;h;$!d' $HOME/.bash_history"
source_command = "tac $HOME/.bash_history"
[[cable_channel]]
name = "fish-history"