4 releases

new 0.1.3 Feb 15, 2025
0.1.2 Jan 14, 2025
0.1.1 Nov 16, 2024
0.1.0 Nov 16, 2024

#6 in #cargo-binstall

Download history 219/week @ 2024-11-16 16/week @ 2024-11-23 27/week @ 2024-11-30 16/week @ 2024-12-07 5/week @ 2024-12-14 4/week @ 2025-01-04 246/week @ 2025-01-11 59/week @ 2025-01-18 166/week @ 2025-01-25 84/week @ 2025-02-01 350/week @ 2025-02-08

666 downloads per month
Used in 2 crates

MIT license

12KB
340 lines

which-shell

cargo binstall which-shell

which-shell

fish 3.7.1

usage

use which_shell::which_shell;

fn main() {
    if let Some(sh) = which_shell() {
        println!("{}", sh)
    } else {
        println!("shell is not supported")
    }
}

shell

  • Bash
  • Zsh
  • Fish
  • PowerShell
  • Pwsh
  • Cmd
  • Nu
  • Dash
  • Ksh
  • Tcsh
  • Csh

Dependencies

~2.2–3MB
~54K SLoC