diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-10 23:07:08 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-10 23:07:08 -0500 |
commit | a87e03fa707cfdd9779334d4bf177188bb54db5b (patch) | |
tree | 8133f5d896ac433268c88e1e3e41b96d1ed78b9a /src/history.rs | |
parent | ed83c606b26affee61d8745bbc9cd9601f8a52e6 (diff) | |
download | nbsh-a87e03fa707cfdd9779334d4bf177188bb54db5b.tar.gz nbsh-a87e03fa707cfdd9779334d4bf177188bb54db5b.zip |
space to recall focused command to the readline
Diffstat (limited to 'src/history.rs')
-rw-r--r-- | src/history.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/history.rs b/src/history.rs index 93fcaa4..2753470 100644 --- a/src/history.rs +++ b/src/history.rs @@ -138,6 +138,10 @@ impl History { self.entries[idx].lock_arc().await.running() } + pub async fn history_cmd(&self, idx: usize) -> String { + self.entries[idx].lock_arc().await.cmd.clone() + } + pub fn entry_count(&self) -> usize { self.entries.len() } |