New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

jump

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jump - npm Package Compare versions

Comparing version
0.0.7
to
0.0.8
+10
-6
jump.js

@@ -42,2 +42,3 @@ #!/usr/bin/env node

.option('-n --number <n>', 'number of suggestions', Number, 5)
.option('-v --verbose', 'print cd command', false)
.option('-a --auto', 'automatically cd if there is only one result', false)

@@ -54,3 +55,2 @@ .on('--help', function(){

// cleanup function

@@ -61,8 +61,10 @@ var exit = function(x, y, output){

charm.position(0,y);
charm.cursor(true);
if (output) {
charm.write('cd "'+output+'"\n');
if(opts.verbose) charm.write('cd "'+output+'"\n');
process.stderr.write(output);
}
charm.cursor(true);
process.exit();
process.nextTick(function(){
process.exit();
});
}

@@ -100,3 +102,3 @@

charm.position(1+prompt.length+buffer.length, y);
} else if (key && (key.name == "enter" || (key.ctrl && key.name == 'c'))){
} else if (key && (key.name == "enter" || (key.ctrl && (key.name == 'c' || key.name == 'd')))){
exit(x,y,key.name=="enter"?suggestions.get():null);

@@ -122,3 +124,5 @@ } else if (!key || !key.ctrl){

suggestions.update(res);
if (opts.auto && res.length==1) exit(x,y,suggestions.get());
suggestions.render(function(){
if (opts.auto && res.length==1) exit(x,y,suggestions.get());
});
});

@@ -125,0 +129,0 @@ }

@@ -23,3 +23,2 @@ var util = require('util');

this.length = newSuggestions.length;
this.render();
};

@@ -47,3 +46,3 @@

Suggestions.prototype.render = function(){
Suggestions.prototype.render = function(callback){
var size = process.stdout.getWindowSize(),

@@ -69,2 +68,3 @@ lines = size[0],

charm.position(x,y).cursor(true);
callback();
}.bind(this));

@@ -71,0 +71,0 @@ };

@@ -5,3 +5,3 @@ {

"description": "autosuggest change directory",
"version": "0.0.7",
"version": "0.0.8",
"repository": {

@@ -25,2 +25,2 @@ "url": "git://github.com/afriggeri/jump.git"

"preferGlobal": true
}
}