@dawsonbotsford/shell-history
v2.0.0
Published
Get the command history of the user's shell
Downloads
3
Maintainers
Readme
@dawsonbotsford/shell-history
Get the command history of the user's shell
Hard fork of SindreSorhus' shell-history
Install
$ npm install --save shell-history
Usage
const shellHistory = require('shell-history');
console.log(shellHistory());
//=> ['ava', 'echo unicorn', 'node', 'npm test', ...]
API
shellHistory()
Get an array of commands.
On Windows it will always be an empty array as command history is not persisted there.
shellHistory.getContent()
Get the Contents of the first occurring history file in the list of files
shellHistory.parse(string)
Parse a shell history string into an array of commands.
License
MIT © Dawson Botsford