-
Notifications
You must be signed in to change notification settings - Fork 274
Fix and install bash completion for cbmc #6776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix and install bash completion for cbmc #6776
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #6776 +/- ##
========================================
Coverage 77.76% 77.76%
========================================
Files 1568 1568
Lines 180318 180318
========================================
Hits 140231 140231
Misses 40087 40087
Continue to review full report at Codecov.
|
Requires #6775 for CI to pass. |
Avoid line break in goto-check options [blocks: #6776]
0ea77e8
to
862525d
Compare
a1bf826
to
d210ef8
Compare
I see this has some handling of MacOS as an os - but osX uses (sorry, I'm in a meeting now so I can't play around extensively with this, but will have a play with this later.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I did play around with this a bit, and it looks good (works fine locally).
@tautschnig Could you please also update the documentation the Readme.md
, at the zsh
part to include:
autoload -Uz compinit
compinit
on the top of the .zshrc
? That is needed unless someone is running Oh my ZSH. The source for this is https://unix.stackexchange.com/questions/339954/zsh-command-not-found-compinstall-compinit-compdef
) | ||
install( | ||
FILES ${CMAKE_SOURCE_DIR}/scripts/bash-autocomplete/cbmc.sh | ||
DESTINATION etc/bash_completion.d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This folder doesn't exist in osX, at least not by default. Is this the correct one for that platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may require playing with the brew
configuration. I have /usr/local/etc/bash_completion.d/
as created by homebrew, but I'm not sure this will work just like this, or whether we need to adjust the homebrew formula.
I have no idea what's up with the duplicate comments, please ignore them (I didn't create them, so I'm kind of scared to delete them in case it deletes the originals as well) |
1) Use a pragma-free (and working) approach to extract CBMC_OPTIONS. 2) Add completion of all completable arguments to command-line options. 3) Make CMake's install target install the resulting bash completion script in etc/bash_completion.d 4) Make the .deb package depend on bash-completion for the now-included completion snippet to be useful.
d210ef8
to
49d11dc
Compare
@NlightNFotis My apologies for taking this long to get back to you (and this PR)! I have now updated the instructions, could you please (whenever time permits) take a look whether the new documentation matches your expectations? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the comments with the explanation!
script in etc/bash_completion.d
completion snippet to be useful.