From 0506b66d915869645990528f9ead56b47c78bf0d Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 17 Apr 2022 06:59:04 +0200 Subject: [PATCH] zsh functions: make ret local variable --- .config/zsh/functions/mxc2http | 2 +- .config/zsh/functions/putwww | 2 +- .config/zsh/functions/readwwwlog | 2 +- .config/zsh/functions/xdgtag | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/zsh/functions/mxc2http b/.config/zsh/functions/mxc2http index 3d6fb1f..64e8977 100755 --- a/.config/zsh/functions/mxc2http +++ b/.config/zsh/functions/mxc2http @@ -8,7 +8,7 @@ local -a o_help=() local -a o_server=() zparseopts -D -K -- h=o_help -server:=o_server if [[ ${#o_help} -ne 0 || ! -v 1 ]]; then - ret=$(( ${#o_help} ^ 1 )) + local ret=$(( ${#o_help} ^ 1 )) print -u $(( 1 + ${ret} )) "usage: ${0} [-h] …" return ${ret} fi diff --git a/.config/zsh/functions/putwww b/.config/zsh/functions/putwww index ee1db0e..85429d4 100755 --- a/.config/zsh/functions/putwww +++ b/.config/zsh/functions/putwww @@ -8,7 +8,7 @@ local -a o_dir=(-d "") local -a o_help=() zparseopts -D -K -- d:=o_dir h=o_help if [[ ${#o_help} -ne 0 || ! -v 1 ]]; then - ret=$(( ${#o_help} ^ 1 )) + local ret=$(( ${#o_help} ^ 1 )) print -u $(( 1 + ${ret} )) "usage: ${0} [-h] [-d REMOTE SUBDIR] …" return ${ret} fi diff --git a/.config/zsh/functions/readwwwlog b/.config/zsh/functions/readwwwlog index b4e8da3..3ef8b85 100755 --- a/.config/zsh/functions/readwwwlog +++ b/.config/zsh/functions/readwwwlog @@ -8,7 +8,7 @@ zmodload zsh/zutil local -a o_help=() zparseopts -D -K -- h=o_help if [[ ${#o_help} -ne 0 || ! -v 1 ]]; then - ret=$(( ${#o_help} ^ 1 )) + local ret=$(( ${#o_help} ^ 1 )) print -u $(( 1 + ${ret} )) "usage: ${0} [-h] …" return ${ret} fi diff --git a/.config/zsh/functions/xdgtag b/.config/zsh/functions/xdgtag index b47d384..c0bfe5d 100755 --- a/.config/zsh/functions/xdgtag +++ b/.config/zsh/functions/xdgtag @@ -7,7 +7,7 @@ zmodload zsh/zutil local -a o_help=() zparseopts -D -K -- h=o_help if [[ ${#o_help} -ne 0 || ! -v 2 ]] || [[ ${1} != "list" && ! -v 3 ]]; then - ret=$(( ${#o_help} ^ 1 )) + local ret=$(( ${#o_help} ^ 1 )) print -u $(( 1 + ${ret} )) "usage: ${0} [-h] list|add|del|find [TAG] …" return ${ret} fi