Skip to content

Commit

Permalink
refactor(shell): use $HISTFILE for cable history channels (#210)
Browse files Browse the repository at this point in the history
Fixes #209
  • Loading branch information
alexpasmantier authored Jan 2, 2025
1 parent 9079ed7 commit 971a2e7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cable/unix-channels.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ preview_command = ":files:"
# Shell history
[[cable_channel]]
name = "zsh-history"
source_command = "tail -r $HOME/.zsh_history | cut -d\";\" -f 2-"
source_command = "tail -r $HISTFILE | cut -d\";\" -f 2-"

[[cable_channel]]
name = "bash-history"
source_command = "tail -r $HOME/.bash_history"
source_command = "tail -r $HISTFILE"

[[cable_channel]]
name = "fish-history"
Expand Down
15 changes: 15 additions & 0 deletions cable/windows-channels.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,18 @@ preview_command = "git show -p --stat --pretty=fuller --color=always {0}"
name = "docker-images"
source_command = "docker image list --format \"{{.ID}}\""
preview_command = "docker image inspect {0} | jq -C"

# Shell history
[[cable_channel]]
name = "zsh-history"
source_command = "tail -r $HISTFILE | cut -d\";\" -f 2-"

[[cable_channel]]
name = "bash-history"
source_command = "tail -r $HISTFILE"

[[cable_channel]]
name = "fish-history"
source_command = "fish -c 'history'"


0 comments on commit 971a2e7

Please sign in to comment.