diff --git a/modules/archive/functions/archive b/modules/archive/functions/archive index fab409e..10bbad3 100644 --- a/modules/archive/functions/archive +++ b/modules/archive/functions/archive @@ -8,7 +8,7 @@ # function archive { -local archive_name path_to_archive _gzip_bin _bzip2_bin +local archive_name path_to_archive _gzip_bin _bzip2_bin _xz_bin if (( $# < 2 )); then cat >&2 <&2 < 0 )); do if [[ ! -s "$1" ]]; then print "$0: file not valid: $1" >&2 @@ -42,15 +66,13 @@ while (( $# > 0 )); do file_path="${1:A}" extract_dir="${file_name:r}" case "$1:l" in - (*.tar.gz|*.tgz) tar xvzf "$1" ;; - (*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;; - (*.tar.xz|*.txz) tar --xz --help &> /dev/null \ - && tar --xz -xvf "$1" \ - || xzcat "$1" | tar xvf - ;; + (*.tar.gz|*.tgz) tar -xvf "$1" --use-compress-program="${_gzip_bin}" ;; + (*.tar.bz2|*.tbz|*.tbz2) tar -xvf "$1" --use-compress-program="${_bzip2_bin}" ;; + (*.tar.xz|*.txz) tar -xvf "$1" --use-compress-program="${_xz_bin}" ;; (*.tar.zma|*.tlz) tar --lzma --help &> /dev/null \ && tar --lzma -xvf "$1" \ - || lzcat "$1" | tar xvf - ;; - (*.tar) tar xvf "$1" ;; + || lzcat "$1" | tar -xvf - ;; + (*.tar) tar -xvf "$1" ;; (*.gz) gunzip "$1" ;; (*.bz2) bunzip2 "$1" ;; (*.xz) unxz "$1" ;; diff --git a/modules/editor/init.zsh b/modules/editor/init.zsh index 085947e..3a7d66e 100644 --- a/modules/editor/init.zsh +++ b/modules/editor/init.zsh @@ -269,9 +269,11 @@ bindkey -d # Emacs Key Bindings # -for key in "$key_info[Escape]"{B,b} "${(s: :)key_info[ControlLeft]}" +for key in "$key_info[Escape]"{B,b} "${(s: :)key_info[ControlLeft]}" \ + "${key_info[Escape]}${key_info[Left]}" bindkey -M emacs "$key" emacs-backward-word -for key in "$key_info[Escape]"{F,f} "${(s: :)key_info[ControlRight]}" +for key in "$key_info[Escape]"{F,f} "${(s: :)key_info[ControlRight]}" \ + "${key_info[Escape]}${key_info[Right]}" bindkey -M emacs "$key" emacs-forward-word # Kill to the beginning of the line. diff --git a/modules/node/functions/node-info b/modules/node/functions/node-info index 9feca3e..c43759b 100644 --- a/modules/node/functions/node-info +++ b/modules/node/functions/node-info @@ -23,7 +23,7 @@ elif (( $+commands[node] )) ; then version="${$(node -v)#v}" fi -if [[ "$version" != (none|) ]]; then +if [[ "$version" != (none|system) ]]; then zstyle -s ':prezto:module:node:info:version' format 'version_format' zformat -f version_formatted "$version_format" "v:$version" node_info[version]="$version_formatted" diff --git a/modules/utility/README.md b/modules/utility/README.md index 3b25b3a..1179478 100644 --- a/modules/utility/README.md +++ b/modules/utility/README.md @@ -62,6 +62,12 @@ Aliases - `mysql` - `rm` +To disable all spelling corrections, add the following line to *zpreztorc*: + +```sh +zstyle ':prezto:module:utility' correct 'no' +``` + ### Disabled File Globbing - `bower` diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 6b07bf0..59a04f9 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -11,7 +11,9 @@ pmodload 'helper' 'spectrum' # Correct commands. -setopt CORRECT +if zstyle -T ':prezto:module:utility' correct; then + setopt CORRECT +fi # # Aliases