
Product
Introducing Repository Labels and Security Policies
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
select-shell
Advanced tools
npm install select-shell
Simply navigate + make selection with the arrow keys...
Up and Down - Navigates on the options
Right - Check the option
Left - Uncheck the option
Enter/Return - confirms the options selected
Esc - Cancel/Exit
'use strict';
var list = require('./index')(
/* possible configs */
{
pointer: ' ▸ ',
pointerColor: 'yellow',
checked: ' ◉ ',
unchecked:' ◎ ',
checkedColor: 'blue',
msgCancel: 'No selected options!',
msgCancelColor: 'orange',
multiSelect: true,
inverse: true,
prepend: true,
disableInput: true
}
);
var stream = process.stdin;
list.option(' One ')
.option(' Two ')
.option(' Three ')
.list();
list.on('select', function(options){
console.log(options);
process.exit(0);
});
list.on('cancel', function(options){
console.log('Cancel list, '+ options.length +' options selected');
process.exit(0);
});
var select = require('select-shell')(
/* These are the default values */
{
pointer: '> ',
pointerColor: 'white',
checked: ' ✓',
unchecked: '',
checkedColor: 'green',
msgCancel: 'No selected options!',
msgCancelColor: 'red',
multiSelect: true,
inverse: false,
prepend: false,
disableInput: true
}
);
sample.coffee
.list = require('.')
pointer : ' ► '
checked : ' ◉ '
unchecked : ' ◎ '
prepend : true
style | color | theme |
---|---|---|
bold | yellow | rainbow |
italic | cyan | random |
underline | white | zebra |
inverse | magenta | |
green | ||
red | ||
grey | ||
blue |
FAQs
list of select for nodejs on terminal.
The npm package select-shell receives a total of 992 weekly downloads. As such, select-shell popularity was classified as not popular.
We found that select-shell demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
Research
Security News
Socket researchers uncovered malicious npm and PyPI packages that steal crypto wallet credentials using Google Analytics and Telegram for exfiltration.
Product
Socket now supports .NET, bringing supply chain security and SBOM accuracy to NuGet and MSBuild-powered C# projects.