summaryrefslogtreecommitdiffstats
path: root/src/shell/mod.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-01-08 17:20:47 -0500
committerJesse Luehrs <doy@tozt.net>2022-01-08 17:20:47 -0500
commitbfc458a5ce75762624115feaa50cfd3a3edd7bc0 (patch)
treec1cff85389a49d15fb4a422043ff44e75e37ee0a /src/shell/mod.rs
parentfe1fc9d45a1aa107d1fae27627b3ea698f774193 (diff)
downloadnbsh-bfc458a5ce75762624115feaa50cfd3a3edd7bc0.tar.gz
nbsh-bfc458a5ce75762624115feaa50cfd3a3edd7bc0.zip
remove unnecessary code
Diffstat (limited to 'src/shell/mod.rs')
-rw-r--r--src/shell/mod.rs15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/shell/mod.rs b/src/shell/mod.rs
index 2e28ddb..7a16651 100644
--- a/src/shell/mod.rs
+++ b/src/shell/mod.rs
@@ -320,7 +320,8 @@ impl Shell {
self.readline.clear_input();
let entry = self.history.entry(idx).await;
let input = entry.cmd();
- let idx = match self.parse(input) {
+ let idx = match crate::parse::ast::Commands::parse(input)
+ {
Ok(ast) => {
let idx = self
.history
@@ -438,7 +439,8 @@ impl Shell {
textmode::Key::Ctrl(b'm') => {
let input = self.readline.input();
if !input.is_empty() {
- let idx = match self.parse(input) {
+ let idx = match crate::parse::ast::Commands::parse(input)
+ {
Ok(ast) => {
let idx = self
.history
@@ -578,13 +580,4 @@ impl Shell {
}
self.focus_idx().map_or(Focus::Readline, Focus::History)
}
-
- fn parse(
- &self,
- cmd: &str,
- ) -> Result<crate::parse::ast::Commands, crate::parse::Error> {
- let ast = crate::parse::ast::Commands::parse(cmd)?;
- // todo: interpolate
- Ok(ast)
- }
}