New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dawsonbotsford/shell-history

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dawsonbotsford/shell-history

Get the command history of the user's shell

2.0.0
latest
Source
npm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

@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

Keywords

shell

FAQs

Package last updated on 30 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts