From: Masatake Y. <ya...@re...> - 2008-08-13 10:25:16
|
> Copyright added. Sure, getting into bash is probably a good thing to > do. I thought somewhere I saw a builtin function called something like > SETVAR0 for zsh which does the same thing. I don't see it now though. > But the idea is that if there are other corresponding builtin > functions for other shells, I'd like to try to call this the same > thing and have it work the same way. > > Which reminds me about readarray. zsh does have a builtin function > called mapfile. However that doesn't work like readarray. Instead it > reads a file in as a string preserving and newlines are inside the > string. You'd still have to split the string into an array. > > The purpose of set0 in the debugger is that users often write programs > that refer to $0. For example to display a usage string or maybe they > change the behavior based on how they were called. So this helps in > making these programs act the same way and gives an alternative to > invoking with "bash --debugger". Thank you for the explanation. I think set0 is very good name. The name tell its function well. So I'll push set0 to the bash maintainer. However, I think extending the original `set' command to handle $0 is not so bad. So I'll propose both the name set0 and extending set to the maintainer, and I'll get the comment from him. Masatake YAMATO |