Skip to content

Conversation

@Emantor
Copy link
Member

@Emantor Emantor commented Mar 3, 2017

TODO:

  • Squash shell scripts
  • Add filter support to bash completion

@coveralls
Copy link

coveralls commented Mar 3, 2017

Coverage Status

Coverage decreased (-0.1%) to 48.358% when pulling ef8dd98 on Emantor:topic/completion into 94572da on labgrid-project:master.

@coveralls
Copy link

coveralls commented Mar 6, 2017

Coverage Status

Coverage decreased (-0.1%) to 48.358% when pulling 76a5345 on Emantor:topic/completion into 94572da on labgrid-project:master.


case "$prev" in
-p)
COMPREPLY=( $( compgen -W "$(labgrid-client complete places)" -- $cur ) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe cache the list in a global variable and only rerun the command if COMPREPLY is empty?

release\
env\
power\
console" -- $cur ) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This list should be generated. Either from parsing labgrid-client -h or new new labgrid-client complete commands. Otherwise this is always out of date. Just cache the list in a global variable to speed things up.

# completing an option
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W "-p -h -x" -- $cur ) )
else

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to split things up here. compgen will filter thing correctly depending on $cur.

@coveralls
Copy link

coveralls commented Mar 10, 2017

Coverage Status

Coverage decreased (-0.1%) to 48.358% when pulling 86f45d4 on Emantor:topic/completion into 94572da on labgrid-project:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 48.201% when pulling f94fdd4 on Emantor:topic/completion into 3aa1c05 on labgrid-project:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 48.201% when pulling f94fdd4 on Emantor:topic/completion into 3aa1c05 on labgrid-project:master.

@Emantor Emantor force-pushed the topic/completion branch 3 times, most recently from 65e5c34 to 1112993 Compare March 28, 2017 08:28
Emantor added 9 commits April 9, 2017 20:39
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Add filter support to complete command:
-m, --mine     places/resources acquired by the local client
-a, --acquired places/resources acquired by all clients
@Emantor Emantor force-pushed the topic/completion branch from 1112993 to bb2a8f1 Compare April 9, 2017 18:39
@codecov-io
Copy link

codecov-io commented Apr 9, 2017

Codecov Report

Merging #19 into master will decrease coverage by 0.1%.
The diff coverage is 20%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #19     +/-   ##
========================================
- Coverage    56.5%   56.4%   -0.2%     
========================================
  Files          77      77             
  Lines        3440    3450     +10     
========================================
+ Hits         1947    1949      +2     
- Misses       1493    1501      +8
Impacted Files Coverage Δ
labgrid/remote/client.py 55.7% <20%> (-0.8%) ⬇️

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 77e202c...bb2a8f1. Read the comment docs.

@Emantor
Copy link
Member Author

Emantor commented Jul 25, 2017

Closing this for now.

@Emantor Emantor closed this Jul 25, 2017
@Emantor Emantor deleted the topic/completion branch March 2, 2018 11:47
@rohieb
Copy link
Contributor

rohieb commented May 2, 2021

Oh, why was this abandoned? I think shell completion for labgrid-client would be a great feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants