feat: add link command
This commit is contained in:
31
src/cli/link.rs
Normal file
31
src/cli/link.rs
Normal file
@@ -0,0 +1,31 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use clap::Subcommand;
|
||||
|
||||
#[derive(Subcommand, Debug)]
|
||||
pub enum Link {
|
||||
/// Move untracked paths into the store and symlink them back
|
||||
Add {
|
||||
/// Untracked or ignored paths inside the repository
|
||||
#[arg(required = true)]
|
||||
paths: Vec<PathBuf>,
|
||||
|
||||
/// Link to a store path that already exists
|
||||
#[arg(long)]
|
||||
force: bool,
|
||||
},
|
||||
|
||||
/// List untracked paths a sandbox would still see
|
||||
Check {
|
||||
/// Limit the listing to these paths
|
||||
paths: Vec<PathBuf>,
|
||||
|
||||
/// Print `<code> <path>` for scripts, as `git status --porcelain` does
|
||||
#[arg(long)]
|
||||
porcelain: bool,
|
||||
|
||||
/// Terminate porcelain entries with NUL
|
||||
#[arg(short = 'z')]
|
||||
null: bool,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user