Hotshell Util
A collection of common Hotshell patterns
Hotshell is a command-line application to efficiently recall and share commands.
hotshell-util
aims to factor and distribute a common set of patterns.
Content
Patterns
Prompt
Prompt for inputs before executing a command.
Usage:
See demo source code.
Confirm
"Are you sure? [y/n]"
Usage:
See demo source code.
Tips
Chain patterns
Prompt for input then ask for confirmation
See demo source code.
Import hotshell-util
Using Node
Node is not required to use Hotshell.
However, If you have an Node environment, you can leverage
the fact that hotshell-util
is published as a npm module.
You can add hotshell-util
in your package.json
or install it manually using npm install hotshell-util
.
You can then import it using var util = require('./node_modules/hotshell-util')
.
Without Node
Hotshell does not yet support downloading npm modules, see Hotshell issue #11.
In the meantime, here are two solutions if you do not have a Node environment.
Copy the file
Copy util.hs.js
along your hs.js
file and import it using var util = require('./util.hs.js')
.
Symlink the project
Clone hotshell-util
, symlink util.hs.js
along your hs.js
file and import it using var util = require('./util.hs.js')
.