Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to trap to script EXIT instead of function EXIT?
- X-seq: zsh-users 23784
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: pengyu.ut@xxxxxxxxx
- Subject: Re: How to trap to script EXIT instead of function EXIT?
- Date: Sun, 2 Dec 2018 23:41:41 -0800
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jyUyngbKZI8tkACBCmpNXSxo7mF5V6G+6J1VJKSW+Ns=; b=YlyvOS7s+dX8yAwjQ9CP6SFVH2LJOFbNkZ+LDDXYxLeVHft7MU6fVqq4leC83Qjm3s 9zM813vVJ23IkNC9Ecbb7MIrphqbr3QXBcGAyZEn3MWuRhREu47bJSlkwprkDuBIfGP1 ATCBhA0uotQjtva8OiHfLANJowhcbh68s+b2V4LpxUMncKqziXppvzvHARcFYw/nsZb2 mBtM2o4RFxAuX/k2LMkPF6UCCoPFDnfEzn7KNTzNYX7y5Dgn6MuwUYcKM2STru4Y0TAE FHp400K4JMP1YpkSfFsapl+liuII/YJhVwd6btIvSO+josOD9Rh4iJQXamAr2RVMlnBK nuEg==
- In-reply-to: <CABrM6wm-dKVroNPXA3-ogthrW4ErbA603cPcbNyxNvb+Dz2ppQ@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CABrM6wm-dKVroNPXA3-ogthrW4ErbA603cPcbNyxNvb+Dz2ppQ@mail.gmail.com>
On Sun, Dec 2, 2018 at 8:10 PM Peng Yu <pengyu.ut@xxxxxxxxx> wrote:
>
> The following example shows that `trap` inside a function is trapped
> to the function. This behavior is different from bash. Is there a way
> to make it the same as bash?
setopt posixtraps
Or more generally, "emulate sh".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author