]> git.proxmox.com Git - proxmox-backup.git/commitdiff
src/bin/completion.rs: add history support
authorDietmar Maurer <dietmar@proxmox.com>
Sat, 30 Nov 2019 14:08:37 +0000 (15:08 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 30 Nov 2019 14:08:37 +0000 (15:08 +0100)
src/bin/completion.rs

index 15bd309ba5b7bcc8f6e5aecc9b0bf7327091a441..6006ff72e17ccca1b839b4bf13ba752ee487f371 100644 (file)
@@ -56,7 +56,9 @@ fn main() -> Result<(), Error> {
 
         let args = shellword_split(&line)?;
 
-        handle_command(helper.cmd_def(), "", args);
+        let _ = handle_command(helper.cmd_def(), "", args);
+
+        rl.add_history_entry(line);
     }
 
     Ok(())