@dawsonbotsford/shell-history

2.0.0 • Public • Published

@dawsonbotsford/shell-history Build Status

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

Package Sidebar

Install

npm i @dawsonbotsford/shell-history

Weekly Downloads

0

Version

2.0.0

License

MIT

Last publish

Collaborators

  • dawsonbotsford