diff options
| author | step <step-@users.noreply.github.com> | 2023-10-07 10:26:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-07 17:26:46 +0900 |
| commit | 0f15f1ab73826b615caf395473160efc355143cb (patch) | |
| tree | e4a5d42f769ca4adf75de482afd3d2df1ab74dfa /shell/completion.bash | |
| parent | 488a236b7a4d01e910e0ac80b4794a7a054fb3a8 (diff) | |
| download | fzf-0f15f1ab73826b615caf395473160efc355143cb.tar.gz | |
[bash] Improve mawk detection (#3463)
* Use the all-compatible mawk `-W version` option.
https://github.com/junegunn/fzf/pull/3313#issuecomment-1747934690.
* Run the command and not a function consistently with #3462.
The version check bash code relies on the following mawk source code,
extracted from mawk 1.3.4 20230322.
```
version.c:
18- #include "init.h"
19- #include "patchlev.h"
20-
21: #define VERSION_STRING \
22- "mawk %d.%d%s %s\n\
23- Copyright 2008-2022,2023, Thomas E. Dickey\n\
24- Copyright 1991-1996,2014, Michael D. Brennan\n\n"
....
30- void
31- print_version(FILE *fp)
32- {
33: fprintf(fp, VERSION_STRING, PATCH_BASE, PATCH_LEVEL, PATCH_STRING, DATE_STRING);
34- fflush(fp);
35-
36- #define SHOW_RANDOM "random-funcs:"
patchlev.h:
13- /*
14- * $MawkId: patchlev.h,v 1.128 2023/03/23 00:23:57 tom Exp $
15- */
16: #define PATCH_BASE 1
17- #define PATCH_LEVEL 3
18- #define PATCH_STRING ".4"
19- #define DATE_STRING "20230322"
```
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
Diffstat (limited to 'shell/completion.bash')
0 files changed, 0 insertions, 0 deletions
