Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
b186aab0
Commit
b186aab0
authored
5 years ago
by
Lionel Blatter
Browse files
Options
Downloads
Patches
Plain Diff
Add full completion for "-wp-prover"
Fix typos
parent
8e4f5f0c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/autocomplete_frama-c
+3
-4
3 additions, 4 deletions
share/autocomplete_frama-c
with
3 additions
and
4 deletions
share/autocomplete_frama-c
+
3
−
4
View file @
b186aab0
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
# If you want to enable Frama-C completion only for your account, append
# If you want to enable Frama-C completion only for your account, append
# this file to ~/.bash_completion.
# this file to ~/.bash_completion.
#
#
# For a less verbose completi
ti
on for options with comma-separated values,
# For a less verbose completion for options with comma-separated values,
# put "set show-all-if-ambiguous on" in your "~/.inputrc".
# put "set show-all-if-ambiguous on" in your "~/.inputrc".
#
#
# Assuming frama-c is in your PATH,
# Assuming frama-c is in your PATH,
...
@@ -93,14 +93,13 @@ _frama-c ()
...
@@ -93,14 +93,13 @@ _frama-c ()
elif [[ "${COMP_WORDS[COMP_CWORD -1]}" == "-wp-prover" ]]
elif [[ "${COMP_WORDS[COMP_CWORD -1]}" == "-wp-prover" ]]
then
then
local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
local prefix=; [[ $cur == *,* ]] && prefix="${cur%,*},"
# The current output of -wp-detect is not suitable for an easy grep using regular expressions,
advance_options="$(frama-c -wp-detect | grep -E -o " \[.*" | grep -E -o "[^\[-\|]*")"
# so the possible completions are not added to $COMPREPLY.
advance_options="none scritp tip alt-ergo altgr-ergo coq native:alt-ergo native:coq native:coqide"
local ambigous="$(bind -v | grep show-all-if-ambiguous)"
local ambigous="$(bind -v | grep show-all-if-ambiguous)"
ambigous="${ambigous##* }"
ambigous="${ambigous##* }"
if [[ "$ambigous" == "on" ]]
if [[ "$ambigous" == "on" ]]
then
then
COMPREPLY=( $( compgen -W "${advance_options}" -- "${cur##*,}" ) )
COMPREPLY=( $( compgen -W "${advance_options}" -- "${cur##*,}" ) )
COMPREPLY+=( $( compgen -W "none script tip native:alt-ergo native:coq native:coqide" -- "${cur##*,}" ) )
[[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
[[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=( ${COMPREPLY/#/$prefix} )
else
else
COMPREPLY=( $( compgen -P "$prefix" -W "${advance_options}" -- "${cur##*,}" ) )
COMPREPLY=( $( compgen -P "$prefix" -W "${advance_options}" -- "${cur##*,}" ) )
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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