From 427f07442bcf39d3bcc384259aba257bade2b524 Mon Sep 17 00:00:00 2001 From: Anund Date: Mon, 16 Dec 2024 13:30:02 +1100 Subject: [PATCH] bash: avoid accidents on macos when /bin/bash is being used --- src/build/bash_completions.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/build/bash_completions.zig b/src/build/bash_completions.zig index 02da91ac4..b1924741e 100644 --- a/src/build/bash_completions.zig +++ b/src/build/bash_completions.zig @@ -261,7 +261,12 @@ fn writeBashCompletions(writer: anytype) !void { \\ return 0 \\} \\ - \\complete -o nospace -o bashdefault -F _ghostty ghostty + \\if ! command -v mapfile 2>&1 >/dev/null + \\then + \\ echo "mapfile could not be found. ghostty autocomplete requires bash >=4.0" + \\else + \\ complete -o nospace -o bashdefault -F _ghostty ghostty + \\fi \\ ); }