[PATCH 0/4] improve one-shot variable detection with shell function
- From
- Eric Sunshine <ericsunshine@charter.net>
- Date
- Jul 22, 2024, 06:59 UTC
- Message-ID
- <20240722065915.80760-1-ericsunshine@charter.net>
From: Eric Sunshine <sunshine@sunshineco.com>
This series addresses a blind-spot of check-non-portable-shell's detection of one-shot environment variable assignment with shell functions. In particular, although it correctly detects:
VAR=val shell-func
it will miss invocations such as:
echo X | VAR=val shell-func
References: https://lore.kernel.org/git/CAPig+cRyj8J7MZEufu34NUzwOL2n=w35nT1Ug7FGRwMC0=Qpwg@mail.gmail.com/ https://lore.kernel.org/git/bc1b9cce-d04d-4a79-8fab-55ec3c8bae30@gmail.com/
Eric Sunshine (4): t3430: modernize one-shot "VAR=val shell-func" invocation t4034: fix use of one-shot variable assignment with shell function check-non-portable-shell: improve `VAR=val shell-func` detection check-non-portable-shell: suggest alternative for `VAR=val shell-func`
t/check-non-portable-shell.pl | 4 ++-- t/t3430-rebase-merges.sh | 4 ++-- t/t4034-diff-words.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
-- 2.45.2