Get the rc file path for any Linux/Unix Shell
npm install --save get-shell-rc
const getShellRc = require('get-shell-rc');
// when using bash
getShellRc();
//=> '/users/yourUsername/.bashrc'
// when using zsh
getShellRc();
//=> '/users/yourUsername/.zshrc'
Returns a string
with the absolute file path to your respective shell's rc
file.
MIT © Dawson Botsford