FS#41719 - [systemd] 216-1 'systemctl restart' bash completion error
Attached to Project:
Arch Linux
Opened by Raphaël Bois (vdust) - Wednesday, 27 August 2014, 17:08 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 03 September 2014, 11:33 GMT
Opened by Raphaël Bois (vdust) - Wednesday, 27 August 2014, 17:08 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 03 September 2014, 11:33 GMT
|
Details
Description:
In bash, with bash-completion installed, doing $ systemctl restart [TAB] causes the bash completion on service name to fail with the following error: 'Failed to get properties: Unit name autovt@.service is not valid.' It's caused by the following change in /usr/share/bash-completion/completions/systemctl (line 54): -__get_all_units () { __systemctl $1 list-units --all \ +__get_all_units () { { __systemctl $1 list-unit-files; __systemctl $1 list-units --all; } \ Now outputs files in the form 'name@.service', which are illegal names for 'systemctl show'. Easy fix (line 185): - [[ "$line" =~ \.(device|snapshot|socket|timer)$ ]] || echo " $line"; \ + [[ "$line" =~ @\.|\.(device|snapshot|socket|timer)$ ]] || echo " $line"; \ |
This task depends upon
Closed by Dave Reisner (falconindy)
Wednesday, 03 September 2014, 11:33 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed upstream for 217.
Wednesday, 03 September 2014, 11:33 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed upstream for 217.
Thanks for easy fix!
For example, type "systemctl isolate" then press tab and notice the "Failed to get properties: Unit name autovt@.service is not valid." warning.