Re: unset does not remove functions like a[b] unless -f is specified

2023-02-02 Thread Greg Wooledge
On Thu, Feb 02, 2023 at 04:47:34PM +1000, Martin D Kealey wrote: > > ...in posix mode, fname must be a valid shell name and may not be the name > > of one of the POSIX special builtins. > > In default mode, a function name can be any unquoted shell word that does > > not contain $. ... > > I'm gu

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-02 Thread Dale R. Worley
Greg Wooledge writes: > I'd be totally OK with restricting the function namespace a bit more. > Function names should not be allowed to contain backticks or less-than > or greater-than signs (in my opinion). I'm still undecided about > parentheses, but I'm leaning toward "denied". I'd be perfect

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-02 Thread Greg Wooledge
On Thu, Feb 02, 2023 at 03:02:41PM -0500, Dale R. Worley wrote: > Greg Wooledge writes: > > I'd be totally OK with restricting the function namespace a bit more. > > Function names should not be allowed to contain backticks or less-than > > or greater-than signs (in my opinion). I'm still undecid

Re: SIGINT handling during async functions

2023-02-02 Thread Chet Ramey
On 1/28/23 5:56 AM, Martin D Kealey wrote: Firstly, let's just leave aside "POSIX requires this" for a bit. I know that the requirement is there, and I think it is one of those broken things that ought to have been dropped from POSIX, or at least reduced to optional rather than required. Be

Word-skipping with alias-expand-line

2023-02-02 Thread Addison Brendtro
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux apollo 5.15.0-58-g

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-02 Thread Robert Elz
Date:Thu, 2 Feb 2023 15:36:30 -0500 From:Greg Wooledge Message-ID: | There's a legitimate reason to support function names that contain *some* | punctuation characters beyond underscore. There is a very good reason to allow function names to contain almost any c

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-02 Thread Greg Wooledge
On Fri, Feb 03, 2023 at 06:38:36AM +0700, Robert Elz wrote: > which is harmless, unless the shell is badly breaking the command > execution rules of POSIX (zsh does I believe) but because for any > shell that follows those rules, it is impossible to invoke a function > with a '/' in its name. unic

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-02 Thread Koichi Murase
2023年2月3日(金) 5:37 Greg Wooledge : > There's a legitimate reason to support function names that contain *some* > punctuation characters beyond underscore. Hyphens, periods, colons (single > or double) -- all fine. Some people like namespace::function names, and > bash should continue to allow thos

Re: unset does not remove functions like a[b] unless -f is specified

2023-02-02 Thread Koichi Murase
2023年1月5日(木) 2:56 Emanuele Torre : > [...] > > It seems that, if an operand of unset is in the form of > validvariablename[something], the unset builtin invoked without options, > will only attempt to delete an array element specified by that argument, > and will not fall back to removing a functio