mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
bash: document COMP_WORDBREAKS interaction
This commit is contained in:
@ -37,7 +37,6 @@ fn writeBashCompletions(writer: anytype) !void {
|
|||||||
const pad4 = pad3 ++ pad1;
|
const pad4 = pad3 ++ pad1;
|
||||||
|
|
||||||
try writer.writeAll(
|
try writer.writeAll(
|
||||||
\\
|
|
||||||
\\# -o nospace requires we add back a space when a completion is finished
|
\\# -o nospace requires we add back a space when a completion is finished
|
||||||
\\# and not part of a --key= completion
|
\\# and not part of a --key= completion
|
||||||
\\addSpaces() {
|
\\addSpaces() {
|
||||||
@ -281,6 +280,11 @@ fn writeBashCompletions(writer: anytype) !void {
|
|||||||
\\ cur=""; prev=""; prevWasEq=false; COMPREPLY=()
|
\\ cur=""; prev=""; prevWasEq=false; COMPREPLY=()
|
||||||
\\ ghostty="$1"
|
\\ ghostty="$1"
|
||||||
\\
|
\\
|
||||||
|
\\ # script assumes default COMP_WORDBREAKS of roughly $' \t\n"\'><=;|&(:'
|
||||||
|
\\ # if = is missing this script will degrade to matching on keys only.
|
||||||
|
\\ # eg: --key=
|
||||||
|
\\ # this can be improved if needed see: https://github.com/ghostty-org/ghostty/discussions/2994
|
||||||
|
\\
|
||||||
\\ if [ "$2" = "=" ]; then cur=""
|
\\ if [ "$2" = "=" ]; then cur=""
|
||||||
\\ else cur="$2"
|
\\ else cur="$2"
|
||||||
\\ fi
|
\\ fi
|
||||||
|
Reference in New Issue
Block a user