diff --git a/README.md b/README.md index c3f2245..1f62e18 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +## This Fork + +The purpose of this fork is to expand bash aliases, allowing you to run commands like `gr @something gl` when you've got `alias gl='git pull'` in your profile. **Currently only works for bash.** + +To install this fork: `npm install -g git+ssh://git@github.com:michaek/gr.git` + ## Features - Tag all the things! `gr @work foo` will run the command `foo` in all the paths tagged `@work`. diff --git a/lib/run.js b/lib/run.js index dd3a03e..0744216 100644 --- a/lib/run.js +++ b/lib/run.js @@ -7,7 +7,7 @@ module.exports = function(line, cwd, onDone) { var parts = (Array.isArray(line) ? line : line.split(' ')), task; - task = spawn(parts[0], parts.slice(1), { + task = spawn(process.env.SHELL || '/bin/bash', ['-l', '-O', 'expand_aliases', '-c', parts.join(' ')], { cwd: cwd, stdio: ['ignore', process.stdout, process.stderr] });