mouser-commander 0.1.2

Mouser's commander mode as a plugin: the shell's folder above the prompt, with previews and the media player
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Child processes without a console window on Windows.

use std::ffi::OsStr;
use std::process::Command;

pub fn command(program: impl AsRef<OsStr>) -> Command {
    #[allow(unused_mut)]
    let mut c = Command::new(program);
    #[cfg(windows)]
    {
        use std::os::windows::process::CommandExt;
        const CREATE_NO_WINDOW: u32 = 0x0800_0000;
        c.creation_flags(CREATE_NO_WINDOW);
    }
    c
}