Skip to content

Commit

Permalink
Merge pull request #1 from lugray/better_args
Browse files Browse the repository at this point in the history
Support args with spaces and avoid shell escape problems
  • Loading branch information
jusleg authored Feb 27, 2020
2 parents eb5a072 + 05e1d0e commit 825fa1a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions bin/gitgud
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require 'cli/ui'

def try_to_push_this_thing(spinner)
counter = 1
while !system("git push #{all_of_the_args}")
while !system('git', 'push', *ARGV)
spinner.update_title(spinner_title(counter))
counter += 1
end
Expand All @@ -27,11 +27,7 @@ def plz_push_my_thing_on_git_thx_k_bye
end

def default_to_using_the_plain_git
system("git #{all_of_the_args}")
end

def all_of_the_args
ARGV.join(" ")
system('git', *ARGV)
end

def run_da_whole_show
Expand Down

0 comments on commit 825fa1a

Please sign in to comment.