mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-08 20:45:24 +00:00
fix(zsh): use history command to include recent entries (#379)
Problem: The `_tv_shell_history` command does not include the most recent entries in that shell's history. It uses the `zsh-history` channel, but that's flawed because only the current shell knows its most recent history; it has not yet been written to `$HISTFILE`. Instead, take input from the shell's history command.
This commit is contained in:
parent
ee89b36b42
commit
55705c0855
@ -32,8 +32,7 @@ _tv_shell_history() {
|
|||||||
|
|
||||||
local output
|
local output
|
||||||
|
|
||||||
output=$(tv zsh-history --input "$current_prompt" $*)
|
output=$(history -n -1 0 | tv --input "$current_prompt" $*)
|
||||||
|
|
||||||
|
|
||||||
if [[ -n $output ]]; then
|
if [[ -n $output ]]; then
|
||||||
zle reset-prompt
|
zle reset-prompt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user