lib/guard.rb
def debug_command_execution
      Kernel.send(:alias_method, :original_system, :system)
      Kernel.send(:define_method, :system) do |command, *args|
        ::Guard::UI.debug "Command execution: #{ command } #{ args.join(' ') }"
        original_system command, *args
      end

      Kernel.send(:alias_method, :original_backtick, :'`')
      Kernel.send(:define_method, :'`') do |command|
        ::Guard::UI.debug "Command execution: #{ command }"
        original_backtick command
      end
    end
# Adds a command logger in debug mode. This wraps common command
# execution functions and logs the executed command before execution.
#
Adds a command logger in debug mode. This wraps common command
execution functions and logs the executed command before execution.
Adds a command logger in debug mode . This wraps common command execution functions and logs the executed command before execution .
def debug_command_execution
      Kernel.send(:alias_method, :original_system, :system)
      Kernel.send(:define_method, :system) do |command, *args|
        ::Guard::UI.debug "Command execution: #{ command } #{ args.join(' ') }"
        original_system command, *args
      end
      Kernel.send(:alias_method, :original_backtick, :'`')
      Kernel.send(:define_method, :'`') do |command|
        ::Guard::UI.debug "Command execution: #{ command }"
        original_backtick command
      end
    end
def debug_command_execution Kernel . send ( :alias_method , :original_system , :system ) Kernel . send ( :define_method , :system ) do | command , * args | :: Guard :: UI . debug "Command execution: #{ command } #{ args.join(' ') }" original_system command , * args end Kernel . send ( :alias_method , :original_backtick , :' ` ' ) Kernel . send ( :define_method , :' ` ' ) do | command | :: Guard :: UI . debug "Command execution: #{ command }" original_backtick command end end
Adds a command logger in debug mode.
Adds a command logger in debug mode .