From 6b6208e1416b5eb5aa5a032139d4b61f8939386b Mon Sep 17 00:00:00 2001 From: Bercio Date: Mon, 8 Apr 2013 19:02:48 +0800 Subject: [PATCH] >! doesn't work with no clobber, echo is redundant. Fixed all. --- plugins/last-working-dir/last-working-dir.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh index ccf0f5b22..bc36c80db 100644 --- a/plugins/last-working-dir/last-working-dir.plugin.zsh +++ b/plugins/last-working-dir/last-working-dir.plugin.zsh @@ -9,8 +9,8 @@ local cache_file="$ZSH/cache/last-working-dir" # Updates the last directory once directory is changed. function chpwd() { - # Use >! in case noclobber is set to avoid "file exists" error - echo "$PWD" >! "$cache_file" + # Use >| in case noclobber is set to avoid "file exists" error + pwd >| "$cache_file" } # Changes directory to the last working directory.