bug#55937: [PATCH] touch: create parent directories if needed

2022-06-15 Thread Alan Rosenthal
Thanks for taking the time to review my patch. I agree with you that this change is not strictly required. It's more of a nice to have / ergonomic improvement to the existing touch interface. There are several StackOverflow posts that ask for this very feature:

bug#55937: [PATCH] touch: create parent directories if needed

2022-06-14 Thread Paul Eggert
On 6/14/22 19:20, Alan Rosenthal wrote: `touch -p a/b/c/d/e` will now be the same as running: `mkdir -p a/b/c/d && touch a/b/c/d/e`. I don't see how this useful enough to merit a change, since one can achieve the effect of the proposed "touch -p" with the already-existing "mkdir -p" followed

bug#55937: [PATCH] touch: create parent directories if needed

2022-06-14 Thread Alan Rosenthal
`touch -p a/b/c/d/e` will now be the same as running: `mkdir -p a/b/c/d && touch a/b/c/d/e`. Added an option -p/--create-dirs to create any required directories. Default behavior remains the same. --- src/touch.c | 40 +++- 1 file changed, 39 insertions(+), 1

bug#55937: [PATCH] touch: create parent directories if needed

2022-06-13 Thread David Hilton
I don't like this as the default behavior. If this feature is added, it should be optional, and enabled with -p, like mkdir. David

bug#55937: [PATCH] touch: create parent directories if needed

2022-06-13 Thread Alan Rosenthal
`touch a/b/c/d/e` will now be the same as running `mkdir -p a/b/c/d && touch a/b/c/d/e`. Added an option --no-create-dirs to not create any directories. --- src/touch.c | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/touch.c

bug#55937: [PATCH] touch: create parent directories if needed

2022-06-12 Thread Alan Rosenthal
`touch a/b/c/d/e` will now be the same as running `mkdir -p a/b/c/d && touch a/b/c/d/e`. Added an option --no-create-dirs to not create any directories. --- src/touch.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/touch.c