Skip to content

Commit

Permalink
add exit command to shell
Browse files Browse the repository at this point in the history
  • Loading branch information
NARKOZ committed Jun 22, 2014
1 parent c1ff09a commit c9f9662
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/gitlab/shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ def self.start

client = Gitlab::Client.new(endpoint: '')

while buf = Readline.readline("gitlab> ", true)
while buf = Readline.readline('gitlab> ', true)
next if buf.nil? || buf.empty?
break if buf == 'exit'

buf = buf.split.map(&:chomp)
cmd = buf.shift
args = buf.count > 0 ? buf : []
Expand Down

0 comments on commit c9f9662

Please sign in to comment.