Skip to content

Commit

Permalink
consistent key names
Browse files Browse the repository at this point in the history
  • Loading branch information
MenkeTechnologies committed Dec 12, 2021
1 parent 3c268aa commit 89cee6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions zpwrExpandLib.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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<space>
return
fi
Expand Down Expand Up @@ -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]'"
Expand Down
6 changes: 3 additions & 3 deletions zsh-expand.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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:]]*)(.*)$"

Expand Down

0 comments on commit 89cee6c

Please sign in to comment.