This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* eventpassing.js | |
* | |
* Monkey patch for passing events between EventEmitters | |
* Usage: simply require() this module | |
* | |
* @author Frank Grimm (http://frankgrimm.net) | |
* @version 0.1.3 | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example code for node-abbrev | |
var abbrevlib = require("node-abbrev"); | |
var sys = require("sys"); | |
// valid run modes for the imaginary tool | |
var validModes = ["help", "start", "stop", "status"]; | |
// create Abbreviate instance for the modes | |
// second parameter (case sensitivity) optional, defaults to false | |
var abbrev = new abbrevlib.Abbreviate(validModes); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_sshm() | |
{ | |
local cur prev opts | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
ADD_OPTS=$(sshm --complete) | |
opts="--help --version --add --list --del --show --complete $ADD_OPTS" | |
if [[ ${cur} == * ]] ; then |
NewerOlder