which-shell

Crates.iowhich-shell
lib.rswhich-shell
version0.1.5
created_at2024-11-16 10:55:59.21508+00
updated_at2025-06-05 03:26:35.924191+00
descriptionwhich-shell
homepagehttps://github.com/ahaoboy/which-shell
repositoryhttps://github.com/ahaoboy/which-shell
max_upload_size
id1450298
size15,476
阿豪 (ahaoboy)

documentation

README

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
Commit count: 24

cargo fmt