File tree 4 files changed +7
-5
lines changed
home/dynamic-env/exhaustive/bash
4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,13 @@ _clap_complete_NAME() {
41
41
_CLAP_IFS="$IFS" \
42
42
_CLAP_COMPLETE_INDEX="$_CLAP_COMPLETE_INDEX" \
43
43
_CLAP_COMPLETE_COMP_TYPE="$_CLAP_COMPLETE_COMP_TYPE" \
44
+ _CLAP_COMPLETE_SPACE="$_CLAP_COMPLETE_SPACE" \
44
45
VAR="bash" \
45
46
"COMPLETER" -- "${COMP_WORDS[@]}" \
46
47
) )
47
48
if [[ $? != 0 ]]; then
48
49
unset COMPREPLY
49
- elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "${COMPREPLY-}" =~ [=/:]$ ]]; then
50
+ elif [[ $_CLAP_COMPLETE_SPACE == false ]] && [[ "${COMPREPLY-}" =~ [=/:]$ ]]; then
50
51
compopt -o nospace
51
52
fi
52
53
}
Original file line number Diff line number Diff line change @@ -14,12 +14,13 @@ _clap_complete_exhaustive() {
14
14
_CLAP_IFS=" $IFS " \
15
15
_CLAP_COMPLETE_INDEX=" $_CLAP_COMPLETE_INDEX " \
16
16
_CLAP_COMPLETE_COMP_TYPE=" $_CLAP_COMPLETE_COMP_TYPE " \
17
+ _CLAP_COMPLETE_SPACE=" $_CLAP_COMPLETE_SPACE " \
17
18
COMPLETE=" bash" \
18
19
" exhaustive" -- " ${COMP_WORDS[@]} " \
19
20
) )
20
21
if [[ $? != 0 ]]; then
21
22
unset COMPREPLY
22
- elif [[ $SUPPRESS_SPACE == 1 ]] && [[ " ${COMPREPLY-} " =~ [= /:]$ ]]; then
23
+ elif [[ $_CLAP_COMPLETE_SPACE == false ]] && [[ " ${COMPREPLY-} " =~ [= /:]$ ]]; then
23
24
compopt -o nospace
24
25
fi
25
26
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ _clap_complete_my_app() {
17
17
) )
18
18
if [[ $? != 0 ]]; then
19
19
unset COMPREPLY
20
- elif [[ $SUPPRESS_SPACE == 1 ]] && [[ " ${COMPREPLY-} " =~ [= /:]$ ]]; then
20
+ elif [[ $_CLAP_COMPLETE_SPACE == false ]] && [[ " ${COMPREPLY-} " =~ [= /:]$ ]]; then
21
21
compopt -o nospace
22
22
fi
23
23
}
Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ fn complete_dynamic_empty_option_value() {
384
384
#[ test]
385
385
#[ cfg( all( unix, feature = "unstable-dynamic" ) ) ]
386
386
#[ cfg( feature = "unstable-shell-tests" ) ]
387
- fn complete_dynamic_dir_trailing_space ( ) {
387
+ fn complete_dynamic_dir_no_trailing_space ( ) {
388
388
if !common:: has_command ( CMD ) {
389
389
return ;
390
390
}
@@ -393,7 +393,7 @@ fn complete_dynamic_dir_trailing_space() {
393
393
let mut runtime = common:: load_runtime :: < RuntimeBuilder > ( "dynamic-env" , "exhaustive" ) ;
394
394
395
395
let input = "exhaustive hint --file test\t " ;
396
- let expected = snapbox:: str![ "exhaustive hint --file test % exhaustive hint --file tests/ " ] ;
396
+ let expected = snapbox:: str![ "exhaustive hint --file test % exhaustive hint --file tests/" ] ;
397
397
let actual = runtime. complete ( input, & term) . unwrap ( ) ;
398
398
assert_data_eq ! ( actual, expected) ;
399
399
}
You can’t perform that action at this time.
0 commit comments