Skip to content

Commit

Permalink
"$PWD" = "PWD", >! doesn't work, echo is redundant. Fixed all.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bercio committed Apr 8, 2013
1 parent 989b6ec commit 58a6ed1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/last-working-dir/last-working-dir.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 58a6ed1

Please sign in to comment.