Skip to content

Instantly share code, notes, and snippets.

@satyr
Created October 5, 2008 19:21
Show Gist options
  • Save satyr/14914 to your computer and use it in GitHub Desktop.
Save satyr/14914 to your computer and use it in GitHub Desktop.
; caddy (NOTE: make sure that golf.db has the script's name already)
(defun caddy (opt)
(execute-subprocess
(concat "sh -c \"/bin/ruby ~/scripts/golf/caddy/caddy.rb -n "
opt " " (get-buffer-file-name) "\"")
t "*caddy*")
(other-window))
(defun caddy-l () (interactive) (caddy "-l"))
(defun caddy-r () (interactive) (caddy "-r -y"))
(global-set-key #\F7 'caddy-l)
(global-set-key #\C-F7 'caddy-r)
--- caddy.rb_ 2008-01-16 03:29:57.000000000 +0900
+++ caddy.rb 2008-05-30 04:09:00.228600000 +0900
@@ -98,6 +98,8 @@
$diff_style = :diff
when '-da'
$diff_style = :all
+ when '-y'
+ $submit_confirm = false
when '-u'
user_suffix = ARGV[argn+1]
ARGV.delete_at(argn)
@@ -193,8 +195,8 @@
end
res = res.read_body
- if res =~ /Success.*/
- puts $&
+ if res =~ /Success[^<]*/
+ puts $&.sub!("\n", ' ')
else
puts 'FAILED'
puts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment