8000 Set_default command by hannydevelop · Pull Request #55 · PeggyJV/ocular · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Set_default command #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: old-main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ocular_cli/src/commands/chains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use abscissa_core::{config, Command, FrameworkError, Runnable};
use clap::Parser;

use self::list::ListCmd;
use self::set_default::SetDefaultCmd;
use self::show::ShowCmd;
/// `start` subcommand
///
Expand All @@ -24,6 +25,7 @@ use self::show::ShowCmd;
pub enum ChainsCmd {
Show(ShowCmd),
List(ListCmd),
SetDefault(SetDefaultCmd),
}

impl config::Override<OcularCliConfig> for ChainsCmd {
Expand Down
16 changes: 16 additions & 0 deletions ocular_cli/src/commands/chains/set_default.rs
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
use crate::prelude::*;
use abscissa_core::{Command, Runnable};
use clap::Parser;

#[derive(Command, Debug, Parser)]
pub struct SetDefaultCmd {}

impl Runnable for SetDefaultCmd {
/// SetDefault chain
fn run(&self) {
// fs open file path and append changes

// append changes to change default_chain to chain in local directory.

// make sure chain_name already exists. Else, tell users to add chain before setting default
}
}
0