Deutsch   English   Français   Italiano  
<uv5bf2$psbu$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!feeds.phibee-telecom.net!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.unix.shell
Subject: Re: Basta: protecting $_ variable.
Date: Wed, 10 Apr 2024 08:26:42 +0200
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <uv5bf2$psbu$1@dont-email.me>
References: <20240409222039.303@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 Apr 2024 06:26:43 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="63977abd1b4cb9268d9f2058a222d662";
	logging-data="848254"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18ucUPxDbPR+4UIfwM8uThq"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:OGV8TG+FxHRdQqVklMqwEQN/ONw=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <20240409222039.303@kylheku.com>
Bytes: 1752

On 10.04.2024 07:29, Kaz Kylheku wrote:
> [...]
> 
> The trap setup for catching the SIGWINCH and SIGALRM signals now looks
> like this:
> 
>   trap 'basta_uln_save=$_; basta.update_status; : "$basta_uln_save"' ALRM WINCH
> 
> instead of just
> 
>   trap basta.update_status ALRM WINCH

I know that this looks like a hack, but since 'update_status' needs no
arguments you could also more simply just write...?

    trap 'basta.update_status "$_"' ALRM WINCH

(Not sure whether introducing a global variable and supplementary code
or this hack is "better". Just mentioning it for a possible variant.)

Janis

> [...]