commands: fix completion descriptions for shell commands too
This was missed in #15146. Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
This commit is contained in:
parent
4305443c9c
commit
5c9e073cd5
@ -219,7 +219,9 @@ module Commands
|
|||||||
match_data = /^#: (?<desc>\w.*+)$/.match(line)
|
match_data = /^#: (?<desc>\w.*+)$/.match(line)
|
||||||
if match_data
|
if match_data
|
||||||
desc = match_data[:desc]
|
desc = match_data[:desc]
|
||||||
return T.must(desc).split(".").first if short
|
# The same splitting logic is used here.
|
||||||
|
# See comment for Ruby commands above.
|
||||||
|
return T.must(desc).split(/\.(?>\s|$)/).first if short
|
||||||
|
|
||||||
return desc
|
return desc
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user