@cjser/default-shell
v2.2.0-cjser.2
Published
Get the user's default shell
Maintainers
Readme
default-shell
Get the user's default shell
Install
npm install default-shellUsage
import defaultShell from 'default-shell';
// macOS
console.log(defaultShell);
//=> '/bin/bash'
// Windows
console.log(defaultShell);
//=> 'C:\\WINDOWS\\system32\\cmd.exe'There is also a method that gets the correct default shell even if it changes at runtime:
import {detectDefaultShell} from 'default-shell';
console.log(detectDefaultShell());
//=> '/bin/bash'cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/default-shell
