request: enable tab-completion after caffeinate

Bug #1638679 reported by Aaron Wolf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Caffeine
Fix Released
Undecided
Unassigned

Bug Description

since caffeinate works as a command that then takes all existing other bash commands, it's frustrating not to be able to use tab-completion.

Incidentally, for reference, this other C-based little tool that basically replicates caffeinate's functions but just for systemd just added tab-completion functionality, so this same approach should work for caffeinate:

https://github.com/brummer10/nosuspend/commit/e5eb83dd00f2dade533b6ef91fb8e12ec3f18acb

Reuben Thomas (rrt)
Changed in caffeine:
status: New → Fix Released
Revision history for this message
Aaron Wolf (wolftune) wrote :

I updated to the new version 2.9.2 but the bash completion isn't actually working for me. I did check the version and tried starting a new terminal…

Revision history for this message
Reuben Thomas (rrt) wrote :

Thanks for this, and apologies: I didn't understand the constraints on dynamic loading of completions.

I have committed a fix, and will release a new version as soon as I've checked a potential minor error in the script with bash-completion upstream.

Changed in caffeine:
status: Fix Released → Fix Committed
Revision history for this message
Reuben Thomas (rrt) wrote :

By the way, assuming you rely on the default activation of bash-completion, via /etc/profile.d/bash_completion.sh, you'll need to make sure you start a new login shell (e.g. "bash -ls") to test it.

Revision history for this message
Reuben Thomas (rrt) wrote :

A workaround, while you're waiting for the update, is to

sudo mv /usr/share/bash-completion/completions/caffeine /usr/share/bash-completion/completions/caffeinate

Reuben Thomas (rrt)
Changed in caffeine:
status: Fix Committed → Fix Released
Revision history for this message
Aaron Wolf (wolftune) wrote :

Confirmed the fix, it works, thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.