Re: Question about formatting

2018-05-15 Thread Herbert Xu
Devin Hussey wrote: > I would like to contribute to dash, but I am worried about formatting. > Dash has mixed formatting styles, which makes it confusing to > contribute, and I think it would be beneficial to pick a formatting > style and stick to it. Well, dash came from NetBSD so that provides

[v2 PATCH] exec: Stricter pathopt parsing

2018-05-15 Thread Herbert Xu
On Tue, May 15, 2018 at 11:56:57PM +0200, Jilles Tjoelker wrote: > > Some examples/testcases would make this clearer. I wanted to keep this undocumented because it's nonstandard and we may have to change this later. > Note that this also affects CDPATH (good) and MAILPATH (breaks its > undocumen

[v2 PATCH] builtin: Mark more regular built-ins

2018-05-15 Thread Herbert Xu
On Tue, May 15, 2018 at 11:40:02PM +0200, Jilles Tjoelker wrote: > On Tue, May 15, 2018 at 07:27:29PM +0800, Herbert Xu wrote: > > This patch marks the following built-ins as regular, meaning that > > they cannot be overriden using PATH search: > > > hash > > pwd > > type > > ulimi

Question about formatting

2018-05-15 Thread Devin Hussey
I would like to contribute to dash, but I am worried about formatting. Dash has mixed formatting styles, which makes it confusing to contribute, and I think it would be beneficial to pick a formatting style and stick to it. For example, I have seen multiple types of Experimenting with clang-forma

Re: exec: Stricter pathopt parsing

2018-05-15 Thread Jilles Tjoelker
On Tue, May 15, 2018 at 04:49:51PM +0800, Herbert Xu wrote: > This patch changes the parsing of pathopt. First of all only > %builtin and %func (with arbitrary suffixes) will be recognised. > Any other pathopt will be treated as a normal directory. > Furthermore, pathopt can now be specified befo

Re: builtin: Mark more regular built-ins

2018-05-15 Thread Jilles Tjoelker
On Tue, May 15, 2018 at 07:27:29PM +0800, Herbert Xu wrote: > This patch marks the following built-ins as regular, meaning that > they cannot be overriden using PATH search: > hash > pwd > type > ulimit This seems correct, but lacks rationale. The rationale is that pwd sho

builtin: Mark more regular built-ins

2018-05-15 Thread Herbert Xu
This patch marks the following built-ins as regular, meaning that they cannot be overriden using PATH search: hash pwd type ulimit Signed-off-by: Herbert Xu diff --git a/src/builtins.def.in b/src/builtins.def.in index 4441fe4..95e420c 100644 --- a/src/builtins.de

exec: Stricter pathopt parsing

2018-05-15 Thread Herbert Xu
This patch changes the parsing of pathopt. First of all only %builtin and %func (with arbitrary suffixes) will be recognised. Any other pathopt will be treated as a normal directory. Furthermore, pathopt can now be specified before the directory, rather than after it. In fact, a future version m