[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Valid characters for function names
From: |
Eli Schwartz |
Subject: |
Re: Valid characters for function names |
Date: |
Mon, 25 Nov 2019 12:02:57 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 11/25/19 9:41 AM, Reuti wrote:
> Hi,
>
> I got a script using foo++() as function name, and at first I was
> confused of a different behavior between bash 4.2, 4.4 and 5.0. After
> crawling some mailing lists whether this is allowed at all [...]
You can do some fun stuff with function names, which seems fair since
you can also do fun stuff with disk filenames in /usr/bin
☁() { curl -k "https://wttr.in/$*"; }; ☁
alias 🗑=rm; 🗑 --help
function _[ () { echo hello; }; "_["
--
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User
signature.asc
Description: OpenPGP digital signature