schwab 0.3.2

Unofficial Rust client library for the Schwab API, unaffiliated with Schwab brokerage or thinkorswim
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Shell completion generation for the `schwab-agent` command tree.

use std::io;

use clap::CommandFactory;
use clap_complete::generate;

use crate::cli::{Cli, CompletionsArgs};

/// Writes a shell completion script for the requested shell.
pub fn write<W>(args: &CompletionsArgs, writer: &mut W) -> io::Result<i32>
where
    W: io::Write,
{
    let mut command = Cli::command();
    generate(args.shell, &mut command, "schwab-agent", writer);
    Ok(0)
}