stash-cli 0.8.1

A local store for pipeline output and ad hoc file snapshots
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use clap_complete::Shell;
use std::io;
use std::str::FromStr;

fn main() {
    let shell_name = std::env::args().nth(1).unwrap_or_else(|| {
        eprintln!("Usage: stash-completion <bash|fish|zsh>");
        std::process::exit(1);
    });
    let shell = Shell::from_str(&shell_name).unwrap_or_else(|_| {
        eprintln!("Unknown shell: {shell_name}. Supported: bash, fish, zsh");
        std::process::exit(1);
    });
    stash_cli::cmd::write_completions(shell, &mut io::stdout());
}