systemctl: hide first column with --plain instead of --no-legend
Hiding the first column, which may contain bullet circles, with --no-legend is undocumented and potentially unexpected. On the other hand, not printing bullet circles with --plain is documented so hiding the column with that switch is sensible. The combination "--full --no-legend --no-pager --plain" is appropriate for automated processing of systemctl output.
This commit is contained in:
committed by
Lennart Poettering
parent
75dff0f910
commit
1cabd2d0c5
@@ -7,7 +7,7 @@
|
||||
|
||||
__systemctl() {
|
||||
local mode=$1; shift 1
|
||||
systemctl $mode --full --no-legend --no-pager "$@" 2>/dev/null
|
||||
systemctl $mode --full --no-legend --no-pager --plain "$@" 2>/dev/null
|
||||
}
|
||||
|
||||
__systemd_properties() {
|
||||
|
||||
Reference in New Issue
Block a user