소스 검색

my-git-ps1 seems to work fine

pull/1/head
10sr 12 년 전
부모
커밋
dbf2280e54
1개의 변경된 파일11개의 추가작업 그리고 4개의 파일을 삭제
  1. +11
    -4
      emacs.el

+ 11
- 4
emacs.el 파일 보기

@@ -1565,10 +1565,17 @@ when SEC is nil, stop auto save if enabled."
(point-at-eol))))
"")))
(defun my-git-ps1 (str)
(shell-command-to-string (concat "bash -c "
(shell-quote-argument (concat ". /etc/bash_completion.d/git; __git_ps1 "
(shell-quote-argument str)
";")))))
(with-temp-buffer
(insert ". /etc/bash_completion.d/git; __git_ps1 "
(shell-quote-argument str)
";")
(shell-command-on-region (point-min)
(point-max)
"bash -s"
nil
t)
(buffer-substring-no-properties (point-min)
(point-max))))
(defun my-git-shell-command (cmd)
""
(interactive (list (read-shell-command (format "[%s]%s $ git : "


불러오는 중...
취소
저장