Emacs Part 49at UNIX
Emacs Part 49 - 暇つぶし2ch45:名無しさん@お腹いっぱい。
15/12/31 02:04:15.93 .net
今年最後の書き込みになるだろうか
(defun __git_ps1 ()
(let ((branch (with-output-to-string
(call-process "git" nil (list standard-output nil) nil
"describe" "--contains" "--all" "HEAD"))))
(if (string< "" branch)
(concat "("
(if (string-match "[\n\r]+\\'" branch)
(replace-match "" t t branch)
branch)
")")
branch)))
最近シェルのプロンプトに(master)とか出すのが流行りだが
Emacs用に最低限の実装をするとこんな感じだな
Emacs用に色々探したがまともな実装が無かったから自分で作った
適当にプロンプトに組み込んでみてくれ (俺はeshellのプロンプトに組み込んでる)


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch