You are not logged in.

#1 2025-04-17 21:54:08

adamlz
Member
Registered: 2024-05-23
Posts: 3

[solved] Systemctl auto-completion comes strange

Shell env : GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)
systemd version: systemd 257 (257.5-1-arch)

When I tabbed twice after systemctl to get auto-completion of this command, it cames strange.

# systemctl <tab><tab>
add-wants add-requires
bind mount-image
cancel
cat mask
daemon-reexec daemon-reload default whoami
disable
                             emergency exit halt hibernate hybrid-sleep
enable
is-active is-failed is-enabled status show preset help list-dependencies edit set-property revert
isolate
                             is-system-running preset-all list-automounts list-paths
link switch-root
list-machines
                             list-timers list-units list-unit-files poweroff
log-level
log-target
                             reboot rescue show-environment suspend get-default
reenable
reload condreload try-reload-or-restart force-reload
reset-failed
restart reload-or-restart
service-log-level
service-log-target
service-watchdogs
set-default
set-environment unset-environment import-environment
start
stop condstop kill try-restart condrestart freeze thaw
                             suspend-then-hibernate kexec soft-reboot list-jobs list-sockets
unmask

Even networkctl's auto-completion are also collapsed.

# networkctl <tab><tab>
edit cat                                                      mask unmask                                                   status list lldp delete renew up down forcerenew reconfigure
label reload                                                  persistent-storage

Why and how

Last edited by adamlz (2025-04-18 13:09:22)

Offline

#2 2025-04-17 22:00:35

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,768

Re: [solved] Systemctl auto-completion comes strange

Please use [code][/code] tags, the BBS predates markdown by approximately your age. Edit your post in this regard.

Since this seems a formatting problem you might actually want to link a screenshot, but the answer is typically going to be your $PS1 or $PS2 - are ony systemctl/networkctl affected?

Online

#3 2025-04-17 22:27:19

adamlz
Member
Registered: 2024-05-23
Posts: 3

Re: [solved] Systemctl auto-completion comes strange

This is my first post, sorry for my ignorance. (PS I'm 28y.o.)
Other auto-completion seems fine. (like mpv)
Systemd related command all collapsed.

Last edited by adamlz (2025-04-17 22:37:21)

Offline

#4 2025-04-18 06:24:58

adamlz
Member
Registered: 2024-05-23
Posts: 3

Re: [solved] Systemctl auto-completion comes strange

Question solved, my wrong config in /etc/bash.bashrc

IFS=$'\t\n'

It's a wrong config that missing a space character and cause systemd auto-completion collapsed.

Last edited by adamlz (2025-04-18 06:32:57)

Offline

#5 2025-04-18 07:51:36

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,768

Re: [solved] Systemctl auto-completion comes strange

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

Board footer

Powered by FluxBB