Skip to content

Commit 641cb15

Browse files
authored
Merge pull request #1392 from liangxin1300/20240417_completion_crmsh46
[crmsh-4.6] Enhance completion at non-interactive mode
2 parents c75d131 + 08684c0 commit 641cb15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

contrib/bash_completion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ __crmcompadd ()
149149
for x in $1; do
150150
if [[ "$x" == "$3"* ]]; then
151151
if [[ "$x" =~ .*(=|:)$ ]];then
152-
if [[ "$x" =~ ^id=$ ]];then
152+
if [[ "$x" =~ ^id=$ ]] && [ "$x" == "$3" ];then
153153
:
154154
else
155155
COMPREPLY[i++]="$2$x"

crmsh/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,10 @@ def profile_run(context, user_args):
345345

346346
def run():
347347
try:
348+
envsetup()
348349
if len(sys.argv) >= 2 and sys.argv[1] == '--compgen':
349350
compgen()
350351
return 0
351-
envsetup()
352352
userdir.mv_user_files()
353353

354354
ui = ui_root.Root()

0 commit comments

Comments
 (0)