class Gitsh::Shell

Constants

GIT_COMMANDS

Public Instance Methods

_current_branch_name() click to toggle source
# File lib/gitsh/shell.rb, line 13
def _current_branch_name
  `git rev-parse --abbrev-ref HEAD`.strip
end
method_missing(method_name, *args) click to toggle source
# File lib/gitsh/shell.rb, line 17
def method_missing(method_name, *args)
  command = method_name.to_s
  if GIT_COMMANDS.include?(command)
    system("git", command, *args)
  else
    system(command, *args)
  end
end
prompt() click to toggle source
# File lib/gitsh/shell.rb, line 9
def prompt
  "gitsh:#{_current_branch_name}$ "
end