This repository has been archived by the owner on Dec 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d37b436
commit 4440872
Showing
4 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
use global_error::prelude::*; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::{util, util::task::TaskCtx}; | ||
|
||
#[derive(Deserialize)] | ||
pub struct Input { | ||
pub command: String, | ||
pub args: Vec<String>, | ||
} | ||
|
||
#[derive(Serialize)] | ||
pub struct Output {} | ||
|
||
pub struct Task; | ||
|
||
impl super::Task for Task { | ||
type Input = Input; | ||
type Output = Output; | ||
|
||
fn name() -> &'static str { | ||
"show_term" | ||
} | ||
|
||
async fn run(_task: TaskCtx, input: Self::Input) -> GlobalResult<Self::Output> { | ||
let mut command = Vec::new(); | ||
command.push(input.command); | ||
command.extend(input.args); | ||
util::show_term::show_term(&command).await?; | ||
|
||
Ok(Output {}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters