Skip to content

Instantly share code, notes, and snippets.

@syohex
Created November 29, 2011 14:21
Show Gist options
  • Save syohex/1404956 to your computer and use it in GitHub Desktop.
Save syohex/1404956 to your computer and use it in GitHub Desktop.
eshellで shellpopした際にカレントディレクトリをアクティブなバッファのディレクトリにする
;; move current directory
(defadvice shell-pop-up (around shell-pop-up-around activate)
(let ((cwd (nth 1 (split-string (pwd)))))
ad-do-it
(insert cwd)
(eshell-send-input)
(recenter-top-bottom 0)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment