alias e25="/Applications/Emacs.app/Contents/MacOS/Emacs" #以后可以这么用e25 --debug-init
alias e25AndDisown="e25 &;disown;" #直接启动GUI,关闭终端也没有影响
alias ec25="/Applications/Emacs.app/Contents/MacOS/bin/emacsclient --create-frame" #总是创建frame #client
alias ec25tui="ec25 -nw" #在终端中显示
└⋊> time git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
0.01 real 0.00 user 0.00 sys
└⋊> time python --version
Python 2.7.10
0.11 real 0.04 user 0.05 sys
└⋊> time ruby --version
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin15]
0.09 real 0.04 user 0.03 sys
└⋊> time node --version
v6.9.4
0.12 real 0.04 user 0.05 sys
time zsh -l -i -c "printf '__RESULT\\000%s\\000%s' '$PATH' '$MANPATH'" #我这里提示1.679 total
最后我的解决方案:
;; 复用exec-path-from-shell内的一个方法,其实自己实现也可以
(defun exec-path-from-shell-setenv (name value)
"Set the value of environment var NAME to VALUE.
Additionally, if NAME is \"PATH\" then also set corresponding
variables such as `exec-path'."
(setenv name value)
(when (string-equal "PATH" name)
(setq eshell-path-env value
exec-path (append (parse-colon-path value) (list exec-directory)))))
;;调用exec-path-from-shell-setenv,手动传入参数,每次修改PATH都要到这里修改一下。还好我修改不频繁
(exec-path-from-shell-setenv "PATH" "/Users/n/.cask/bin:/opt/theos/bin:/Users/n/wsybin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/usr/local/git/bin:/Users/n/.rvm/bin")