Last active
August 14, 2016 12:34
-
-
Save gro-ove/93693b42fed1b1daeec7d142ad9baf10 to your computer and use it in GitHub Desktop.
Wrapping zsh- or js-script inside a bat-file (for drag'n'drops)
This file contains 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
// 2>nul & node %0 "%1" "%2" "%3" "%4" "%5" & goto :eof | |
var fs = require('fs'); | |
var readline = require('readline'); | |
console.log('\u001BcNode.JS is here!'); | |
console.log(` Working dir: ${__dirname}`); | |
console.log(` Arguments: ${process.argv.slice(2).join(' ')}`); | |
var rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
rl.question('<Press Enter>', a => { | |
rl.close(); | |
}); |
This file contains 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
# 2>nul & zsh %0 "%1" "%2" "%3" "%4" "%5" & goto :eof | |
echo "cZSH is here!" | |
echo " Working dir: ${0:h}" | |
echo " Arguments: ${(j: :)@}" | |
echo "<Press Enter>" | |
read _ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment