Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
liblinphone
Commits
a1977414
Commit
a1977414
authored
10 years ago
by
Gautier Pelloux-Prayer
Browse files
Options
Download
Patches
Plain Diff
Fix completions script when suites have spaces
parent
5aeb75c9
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tester/liblinphone_completion
+5
-5
tester/liblinphone_completion
with
5 additions
and
5 deletions
tester/liblinphone_completion
+
5
−
5
View file @
a1977414
...
@@ -72,20 +72,20 @@ _liblinphone_complete() {
...
@@ -72,20 +72,20 @@ _liblinphone_complete() {
if [ $latest_is_empty = 0 ] && ! grep -q -- '^--' <<< "$latest_arg"; then
if [ $latest_is_empty = 0 ] && ! grep -q -- '^--' <<< "$latest_arg"; then
# echo "yes!$prev_arg $has_not_set_suite"
# echo "yes!$prev_arg $has_not_set_suite"
if [ "$prev_arg" = "--test" ] && [ $has_not_set_suite = 0 ]; then
if [ "$prev_arg" = "--test" ] && [ $has_not_set_suite = 0 ]; then
suite_name=$(echo $@ | sed -nE 's/.*--suite (
[^ ]*) .*/\1/p'
)
suite_name=$(echo $@ | sed -nE 's/.*--suite (
.*) (--.*)$/\1/p' |sed "s@\\\\@@g"
)
completions="$($program --list-tests
"
$suite_name
"
| grep "^$latest_arg")"
completions="$($program --list-tests $suite_name | grep "^$latest_arg")"
elif [ "$prev_arg" = "--suite" ] || [ "$prev_arg" = "--list-tests" ]; then
elif [ "$prev_arg" = "--suite" ] || [ "$prev_arg" = "--list-tests" ]; then
completions="$($program --list-suites)"
completions="$($program --list-suites)"
fi
fi
elif [ "$latest_arg" = "--test" ]; then
elif [ "$latest_arg" = "--test" ]; then
if [ $has_not_set_suite = 0 ]; then
if [ $has_not_set_suite = 0 ]; then
suite_name=$(echo $@ | sed -nE 's/.*--suite (.*)
.*/\1/p'
)
suite_name=$(echo $@ | sed -nE 's/.*--suite (.*)
(--.*)$/\1/p' |sed "s@\\\\@@g"
)
completions="$($program --list-tests
"
$suite_name
"
)"
completions="$($program --list-tests $suite_name)"
fi
fi
elif [ "$latest_arg" = "--suite" ] || [ "$latest_arg" = "--list-tests" ]; then
elif [ "$latest_arg" = "--suite" ] || [ "$latest_arg" = "--list-tests" ]; then
completions="$($program --list-suites)"
completions="$($program --list-suites)"
# we are waiting for a custom value, so do not hint anything
# we are waiting for a custom value, so do not hint anything
elif grep -q -- "^$latest_arg$" <<< "$command_requiring_argument"; then
elif
[[ ! -z "$latest_arg" ]] &&
grep -q -- "^$latest_arg$" <<< "$command_requiring_argument"; then
completions=""
completions=""
else
else
completions="$available_tasks"
completions="$available_tasks"
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets