mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix bash completion for mawk
$ strings < /usr/bin/awk | grep awk mawk 1.3%s%s %s, Copyright (C) Michael D. Brennan $ awk '{print substr($0, 0, 1)}' <<<foo # returns empty string $ awk '{print substr($0, 1, 1)}' <<<foo # returns empty string f $ awk -V | head -1 GNU Awk 5.2.2, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0) $ awk '{print substr($0, 0, 1)}' <<<foo f $ awk '{print substr($0, 1, 1)}' <<<foo f Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
fa963d60d0
commit
b6435b32f0
@ -146,7 +146,7 @@ function _clickhouse_quote()
|
|||||||
# Extract every option (everything that starts with "-") from the --help dialog.
|
# Extract every option (everything that starts with "-") from the --help dialog.
|
||||||
function _clickhouse_get_options()
|
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()
|
function _complete_for_clickhouse_generic_bin_impl()
|
||||||
|
Loading…
Reference in New Issue
Block a user