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

#12 in #fish

Download history 6/week @ 2024-11-25 28/week @ 2024-12-02 19/week @ 2024-12-09 83/week @ 2025-01-06 177/week @ 2025-01-13 149/week @ 2025-01-20 127/week @ 2025-01-27 39/week @ 2025-02-03 582/week @ 2025-02-10 199/week @ 2025-02-17 12/week @ 2025-02-24 4/week @ 2025-03-03 2/week @ 2025-03-10

281 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