Skip to content

Instantly share code, notes, and snippets.

@gongo
Created November 15, 2012 00:53
Show Gist options
  • Save gongo/4075933 to your computer and use it in GitHub Desktop.
Save gongo/4075933 to your computer and use it in GitHub Desktop.
emasc-quickrun でリモートサーバの PHP を使いたい時の設定
(require 'quickrun)
;; 事前に公開鍵登録とかいろいろして
;; パスフレーズ無しの ssh ログインを可能にしておく
(quickrun-add-command "php-for-remote"
'((:command . "ssh remote-sv 'php'")
(:exec . ("%c < %s"))
(:compile-only . "%c -l < %s") ;; syntax check
(:description . "Run PHP script")))
(quickrun-set-default "php" "php-for-remote")
@gongo
Copy link
Author

gongo commented Nov 15, 2012

本当は override を使って

(quickrun-add-command "php"
                      '((:command . "ssh remote-sv 'php'")
                        (:exec . ("%c < %s"))
                        (:compile-only . "%c -l < %s"))
                      :override t)

としたかったんだけど、 quickrun/language-alist の PHP には
:exec が元々存在しないため、override では追加されなかった。(これは quickrun/override-command の仕様っぽい)
というわけで改めて php-for-remote って定義して set-default しました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment