From 9529245cbb78c16d4a8bfc946b788c5e9101c53c Mon Sep 17 00:00:00 2001 From: Gordon Gao Date: Sun, 25 Dec 2016 01:35:55 +0800 Subject: [PATCH] use setopt NO_CLOBBER instead of unsetopt CLOBBER Closes #117 --- modules/directory/README.md | 6 +++--- modules/directory/init.zsh | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/directory/README.md b/modules/directory/README.md index d90a751..5677251 100644 --- a/modules/directory/README.md +++ b/modules/directory/README.md @@ -12,7 +12,7 @@ ZSH options | AUTO_PUSHD | After cd, push the old directory to the directory stack | | PUSHD_IGNORE_DUPS | Don't push multiple copies of the same directory to the stack | | PUSHD_SILENT | Don't print the directory after pushd or popd | -| PUSHD_TO_HOME | pushd without arguments acts like 'pushd ${HOME}' | -| EXTENDED_GLOB | Treat '#', '~', and '^' as patterns for filename globbing | +| PUSHD_TO_HOME | pushd without arguments acts like `pushd ${HOME}` | +| EXTENDED_GLOB | Treat `#`, `~`, and `^` as patterns for filename globbing | | MULTIOS | Performs implicit tees or cats when using redirections | -| CLOBBER | Disables automatic truncation with '>' or '>\|'. Use '>>!' or '>>\|' instead | +| NO_CLOBBER | Disables overwrite existing files with `>`. Use `>|` or `>!` instead | diff --git a/modules/directory/init.zsh b/modules/directory/init.zsh index 00adfc5..60e332d 100644 --- a/modules/directory/init.zsh +++ b/modules/directory/init.zsh @@ -6,7 +6,7 @@ # Navigation # -# If a command is issued that can’t be executed as a normal command, +# If a command is issued that can’t be executed as a normal command, # and the command is the name of a directory, perform the cd command to that directory. setopt AUTO_CD @@ -33,6 +33,6 @@ setopt EXTENDED_GLOB # Perform implicit tees or cats when multiple redirections are attempted. setopt MULTIOS -# Allows ‘>’ redirection to truncate existing files. Otherwise ‘>!’ or ‘>|’ must be used to truncate a file. -# If the option is not set, and the option APPEND_CREATE is also not set, ‘>>!’ or ‘>>|’ must be used to create a file. -unsetopt CLOBBER +# Disallow ‘>’ redirection to overwrite existing files. +# ‘>|’ or ‘>!’ must be used to overwrite a file. +setopt NO_CLOBBER