clink-completions
clink-completions copied to clipboard
added completion script for Cloud Foundry CLI
Fixes #78
Codecov Report
Merging #80 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #80 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 56 56
=====================================
Hits 56 56
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update c288656...87086ba. Read the comment docs.
I would like include this, but it has a dangerous problem:
It runs the entire command line on every completion, including other commands in the command line:
del * & cf
Tab will actually run both the del *
and the cf
command.
This can be partially mitigated by using clink.parseline()
and using only the last line_state
.
But that's not sufficient, either -- for example:
>foo cf
Tab will run the command and redirect output to foo
.
To be able to include this, the argmatcher would need to be more discriminating about what it runs. For example, it could use Responding to Arguments in Argmatchers and user_data
to collect the words that are relevant to the cf
command itself, and run only cf
with those arguments.