diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2019-11-06 19:55:59 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2019-11-06 19:55:59 -0700 |
commit | 1ffd2849fc056dced0c80a9ed8905f29ff9827a5 (patch) | |
tree | 41cff93f7b8d713d1500da68f0f670187ca86740 /plugins/emacs | |
parent | 2e9fe98b8a9fe21b982e719e129678dede63771e (diff) | |
parent | 107e512c9e62b140d8591c578527c901b1db9d37 (diff) | |
download | zsh-1ffd2849fc056dced0c80a9ed8905f29ff9827a5.tar.gz zsh-1ffd2849fc056dced0c80a9ed8905f29ff9827a5.tar.bz2 zsh-1ffd2849fc056dced0c80a9ed8905f29ff9827a5.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/emacs')
-rwxr-xr-x | plugins/emacs/emacsclient.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/emacs/emacsclient.sh b/plugins/emacs/emacsclient.sh index 26b28d495..0aa8d6f40 100755 --- a/plugins/emacs/emacsclient.sh +++ b/plugins/emacs/emacsclient.sh @@ -20,7 +20,8 @@ _emacsfun() # tempfile. (first argument will be `--no-wait` passed in by the plugin.zsh) if [ "$#" -ge "2" -a "$2" = "-" ] then - tempfile="$(mktemp emacs-stdin-$USER.XXXXXXX --tmpdir)" + tempfile="$(mktemp --tmpdir emacs-stdin-$USER.XXXXXXX 2>/dev/null \ + || mktemp -t emacs-stdin-$USER)" # support BSD mktemp cat - > "$tempfile" _emacsfun --no-wait $tempfile else |