posh-tabcomplete 0.5.0

Blazing fast tab completion for powershell.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::io::BufRead;

use crate::TestEnv;

pub fn run_command(shell: &str, command: &str) -> Vec<String> {
    let testenv = TestEnv::new(shell);
    run_with_test_env(&testenv, command)
}

pub fn run_with_test_env(testenv: &TestEnv, command: &str) -> Vec<String> {
    let res = testenv.run_with_profile(command).unwrap();
    res.stdout.lines().map(|x| x.unwrap()).collect()
}