Skip to content

Commit

Permalink
prefix command with bang
Browse files Browse the repository at this point in the history
  • Loading branch information
motemen committed Sep 27, 2014
1 parent de83d64 commit 1faa3f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func doImport(c *cli.Context) {
finalize = func() error { return nil }
} else {
// Handle `ghq import starred motemen` case
// with `git config --global ghq.import.starred "github-list-starred"`
// with `git config --global ghq.import.starred "!github-list-starred"`
subCommand := c.Args().First()
command, err := GitConfigSingle("ghq.import." + subCommand)
if err == nil && command == "" {
Expand All @@ -331,6 +331,7 @@ func doImport(c *cli.Context) {

// execute `sh -c 'COMMAND "$@"' -- ARG...`
// TODO: Windows
command = strings.TrimLeft(command, "!")
shellCommand := append([]string{"sh", "-c", command + ` "$@"`, "--"}, c.Args().Tail()...)

utils.Log("run", strings.Join(append([]string{command}, c.Args().Tail()...), " "))
Expand Down

0 comments on commit 1faa3f3

Please sign in to comment.