diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2022-04-11 00:17:48 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2022-04-11 00:17:48 +0200 |
commit | b09f4483416c54c1782824633dfabaf2ec0265b6 (patch) | |
tree | 304bc82642862525ae680c7fbaa249663b10ad57 /Src/Modules/datetime.c | |
parent | 12eb3e5356f2fc3351eed58ef1cef1b8fb83b504 (diff) | |
parent | 6e55c920503071e917619b8cb1a188cd35d772db (diff) | |
download | zsh-b09f4483416c54c1782824633dfabaf2ec0265b6.tar.gz zsh-b09f4483416c54c1782824633dfabaf2ec0265b6.zip |
New upstream version 5.8.1.2-test
Diffstat (limited to 'Src/Modules/datetime.c')
-rw-r--r-- | Src/Modules/datetime.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/Modules/datetime.c b/Src/Modules/datetime.c index 521c15a5b..085e4cc26 100644 --- a/Src/Modules/datetime.c +++ b/Src/Modules/datetime.c @@ -175,7 +175,8 @@ output_strftime(char *nam, char **argv, Options ops, UNUSED(int func)) setsparam(scalar, metafy(buffer, len, META_DUP)); } else { fwrite(buffer, 1, len, stdout); - putchar('\n'); + if (!OPT_ISSET(ops,'n')) + putchar('\n'); } zfree(buffer, bufsize); @@ -235,7 +236,7 @@ getcurrenttime(UNUSED(Param pm)) } static struct builtin bintab[] = { - BUILTIN("strftime", 0, bin_strftime, 1, 3, 0, "qrs:", NULL), + BUILTIN("strftime", 0, bin_strftime, 1, 3, 0, "nqrs:", NULL), }; static const struct gsu_integer epochseconds_gsu = |