4 releases

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 199/week @ 2024-11-13 33/week @ 2024-11-20 7/week @ 2024-11-27 30/week @ 2024-12-04 14/week @ 2024-12-11 199/week @ 2025-01-08 80/week @ 2025-01-15 139/week @ 2025-01-22 124/week @ 2025-01-29 68/week @ 2025-02-05 650/week @ 2025-02-12 103/week @ 2025-02-19 9/week @ 2025-02-26

833 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–3MB
~53K SLoC