From 89cee6c3c004fccf3dfb600e98a192128622dd3e Mon Sep 17 00:00:00 2001 From: MenkeTechnologies Date: Sat, 11 Dec 2021 21:56:56 -0500 Subject: [PATCH] consistent key names --- zpwrExpandLib.zsh | 4 ++-- zsh-expand.plugin.zsh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/zpwrExpandLib.zsh b/zpwrExpandLib.zsh index 72b2d7f..18ebfe9 100755 --- a/zpwrExpandLib.zsh +++ b/zpwrExpandLib.zsh @@ -77,7 +77,7 @@ function zpwrExpandCorrectWord(){ fi elif (( $#ZPWR_EXPAND_PRE_CORRECT == 2)); then - if [[ $word =~ $ZPWR_VARS[blackSubcommandPositionRegex] ]]; then + if [[ $word =~ $ZPWR_VARS[blacklistSubcommandPositionRegex] ]]; then # sudo/env git init return fi @@ -256,7 +256,7 @@ function zpwrExpandSupernaturalSpace() { #dont expand =word because that is zle expand-word if [[ ${ZPWR_VARS[lastword_lbuffer]:0:1} != '=' ]] && (( $#ZPWR_VARS[lastword_lbuffer] > 0 ));then - if [[ -z $ZPWR_VARS[userBlacklist] ]] || ! [[ $ZPWR_VARS[lastword_lbuffer] =~ $ZPWR_VARS[userBlacklist] ]]; then + if [[ -z $ZPWR_VARS[blacklistUser] ]] || ! [[ $ZPWR_VARS[lastword_lbuffer] =~ $ZPWR_VARS[blacklistUser] ]]; then if (( ${+aliases[${ZPWR_VARS[lastword_lbuffer]}]} )) && ! [[ ${aliases[${ZPWR_VARS[lastword_lbuffer]}]} =~ $ZPWR_VARS[blacklistFirstPosRegex] ]];then #zpwrLogDebug "regular=>'$ZPWR_VARS[lastword_lbuffer]'" diff --git a/zsh-expand.plugin.zsh b/zsh-expand.plugin.zsh index 292dae3..59bd73d 100644 --- a/zsh-expand.plugin.zsh +++ b/zsh-expand.plugin.zsh @@ -49,14 +49,14 @@ fi #************************************************************** ZPWR_VARS[builtinSkips]='(command|time|exec|eval|nocorrect|noglob)' -ZPWR_VARS[userBlacklist]="" +ZPWR_VARS[blacklistUser]="" if (( $#ZPWR_EXPAND_BLACKLIST )); then - ZPWR_VARS[userBlacklist]="^(${(j:|:)ZPWR_EXPAND_BLACKLIST})$" + ZPWR_VARS[blacklistUser]="^(${(j:|:)ZPWR_EXPAND_BLACKLIST})$" fi ZPWR_VARS[blacklistFirstPosRegex]='^(omz_history|grc|_z|zshz|cd|hub|_zsh_tmux_|_rails_|_rake_|mvn-or|gradle-or|noglob |rlwrap ).*$' -ZPWR_VARS[blackSubcommandPositionRegex]='^(cargo|jenv|svn|git|ng|pod|docker|kubectl|rndc|yarn|npm|pip[0-9\.]*|bundle|rails|gem|nmcli|brew|apt|dnf|yum|zypper|pacman|service|proxychains[0-9\.]*|zpwr|zm|zd|zg|zinit)$' +ZPWR_VARS[blacklistSubcommandPositionRegex]='^(cargo|jenv|svn|git|ng|pod|docker|kubectl|rndc|yarn|npm|pip[0-9\.]*|bundle|rails|gem|nmcli|brew|apt|dnf|yum|zypper|pacman|service|proxychains[0-9\.]*|zpwr|zm|zd|zg|zinit)$' ZPWR_VARS[continueFirstPositionRegexNoZpwr]="^([[:space:]]*)([[:graph:]]+=[[:graph:]]+[[:space:]]+)*(([\\\"\']*builtin[\\\"\']*[[:space:]]+)*[\\\"\']*${ZPWR_VARS[builtinSkips]}[\\\"\']*)?([[:space:]]*)(([\\\"\']*sudo[\\\"\']*([[:space:]]+)((-[ABbEHnPSis]+[[:space:]]*|-[CghpTu][[:space:]=]+[[:graph:]]+[[:space:]]+|--)*)*)*([[:graph:]]+=[[:graph:]]+[[:space:]]+)*([\\\"\']*env[\\\"\']*[[:space:]]+(-[iv]+[[:space:]]*|-[PSu][[:space:]=]+[[:graph:]]+[[:space:]]+|--)*)*([[:graph:]]+=[[:graph:]]+[[:space:]]+)*)*([[:space:]]*)(.*)$"