detect-shell
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

detect-shell

Detect shells available on the system (based on vscode's implementation)

npm

Install

$ npm install --save detect-shell

Usage

const {detectAvailableShells} = require('detect-shell');

detectAvailableShells().then((shells) => {
  console.log(shells);
});

// output
[
  { label: 'bash', path: '/bin/bash' },
  { label: 'csh', path: '/bin/csh' },
  { label: 'dash', path: '/bin/dash' },
  { label: 'ksh', path: '/bin/ksh' },
  { label: 'sh', path: '/bin/sh' },
  { label: 'tcsh', path: '/bin/tcsh' },
  { label: 'zsh', path: '/bin/zsh' },
  { label: 'pwsh', path: '/usr/local/bin/pwsh' }
]

Package Sidebar

Install

npm i detect-shell

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

92.1 kB

Total Files

29

Last publish

Collaborators

  • labhansh