This commit is contained in:
naskya 2024-07-01 00:29:32 +09:00
parent 4d9b8f3f02
commit 0df8e7016b
Signed by: naskya
GPG key ID: 712D413B3A9FED5C

View file

@ -22,10 +22,10 @@ struct Args {
command: Commands, command: Commands,
/// Specify the parent of the config directory, /// Specify the parent of the config directory,
/// which typically is Firefish local repo directory /// which typically is Firefish local repo
/// (default: current directory) /// (default: current directory)
#[arg(short = 'd', long, value_name = "PARENT_OF_CONFIG_DIR", global = true)] #[arg(short = 'd', long, value_name = "PARENT_OF_CONFIG_DIR", global = true)]
firefish_dir: Option<String>, base_dir: Option<String>,
} }
#[derive(Subcommand)] #[derive(Subcommand)]
@ -42,7 +42,7 @@ enum Commands {
pub(super) async fn run() -> Result<(), Error> { pub(super) async fn run() -> Result<(), Error> {
let args = Args::parse(); let args = Args::parse();
let dirname = args.firefish_dir.unwrap_or("".to_string()); let dirname = args.base_dir.unwrap_or("".to_string());
let base_dir = Path::new(&dirname); let base_dir = Path::new(&dirname);
match args.command { match args.command {