Merge pull request #56050 from azat/bash-completion-fix

Fix bash completion for mawk (and update format list and add one more delimiter)
This commit is contained in:
Alexey Milovidov 2023-10-27 22:12:42 +02:00 committed by GitHub
commit 59e3d64d2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,7 @@ CLICKHOUSE_Format=(
ArrowStream
Avro
AvroConfluent
BSONEachRow
CSV
CSVWithNames
CSVWithNamesAndTypes
@ -56,6 +57,7 @@ CLICKHOUSE_Format=(
CustomSeparatedIgnoreSpacesWithNamesAndTypes
CustomSeparatedWithNames
CustomSeparatedWithNamesAndTypes
DWARF
HiveText
JSON
JSONAsObject
@ -74,7 +76,7 @@ CLICKHOUSE_Format=(
JSONEachRow
JSONEachRowWithProgress
JSONLines
JSONStringEachRow
JSONObjectEachRow
JSONStrings
JSONStringsEachRow
JSONStringsEachRowWithProgress
@ -90,14 +92,19 @@ CLICKHOUSE_Format=(
Null
ODBCDriver2
ORC
One
Parquet
ParquetMetadata
PostgreSQLWire
Pretty
PrettyCompact
PrettyCompactMonoBlock
PrettyCompactNoEscapes
PrettyCompactNoEscapesMonoBlock
PrettyJSONEachRow
PrettyJSONLines
PrettyMonoBlock
PrettyNDJSON
PrettyNoEscapes
PrettyNoEscapesMonoBlock
PrettySpace
@ -111,6 +118,7 @@ CLICKHOUSE_Format=(
RawBLOB
Regexp
RowBinary
RowBinaryWithDefaults
RowBinaryWithNames
RowBinaryWithNamesAndTypes
SQLInsert
@ -146,7 +154,7 @@ function _clickhouse_quote()
# Extract every option (everything that starts with "-") from the --help dialog.
function _clickhouse_get_options()
{
"$@" --help 2>&1 | awk -F '[ ,=<>]' '{ for (i=1; i <= NF; ++i) { if (substr($i, 0, 1) == "-" && length($i) > 1) print $i; } }' | sort -u
"$@" --help 2>&1 | awk -F '[ ,=<>.]' '{ for (i=1; i <= NF; ++i) { if (substr($i, 1, 1) == "-" && length($i) > 1) print $i; } }' | sort -u
}
function _complete_for_clickhouse_generic_bin_impl()