[systemd-devel] [PATCH] shell-completion/bash/systemctl: add completion for properties

harald at redhat.com harald at redhat.com
Tue Apr 16 07:16:56 PDT 2013


From: Harald Hoyer <harald at redhat.com>

---
 TODO                            |  2 --
 shell-completion/bash/systemctl | 13 ++++++++++++-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/TODO b/TODO
index f90c66b..22c26a3 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,6 @@
 Bugfixes:
 * timedatectl: NTP enabled: n/a
 
-* systemctl --system show -p Fr<TAB> default.target doesn't show anything
-
 * check systemd-tmpfiles for selinux context hookup for mknod(), symlink() and similar
 
 * swap units that are activated by one name but shown in the kernel under another are semi-broken
diff --git a/shell-completion/bash/systemctl b/shell-completion/bash/systemctl
index f24a145..c854f86 100644
--- a/shell-completion/bash/systemctl
+++ b/shell-completion/bash/systemctl
@@ -89,7 +89,18 @@ _systemctl () {
                                 comps=$(compgen -A hostname)
                         ;;
                         --property|-p)
-                                comps=''
+                                comps='ActiveEnterTimestamp ActiveEnterTimestampMonotonic ActiveExitTimestamp
+                                       ActiveExitTimestampMonotonic ActiveState After AllowIsolate Before BindsTo BoundBy
+                                       CanIsolate CanReload CanStart CanStop ConditionResult ConditionTimestamp
+                                       ConditionTimestampMonotonic ConflictedBy Conflicts ConsistsOf ControlGroupAttributes
+                                       ControlGroups DefaultControlGroup DefaultDependencies Description Documentation DropInPaths
+                                       Following FragmentPath Id IgnoreOnIsolate IgnoreOnSnapshot InactiveEnterTimestamp
+                                       InactiveEnterTimestampMonotonic InactiveExitTimestamp InactiveExitTimestampMonotonic
+                                       Job JobTimeoutUSec LoadError LoadState Names NeedDaemonReload OnFailure OnFailureIsolate
+                                       PartOf PropagatesReloadTo RefuseManualStart RefuseManualStop ReloadPropagatedFrom
+                                       RequiredBy RequiredByOverridable Requires RequiresMountsFor RequiresOverridable Requisite
+                                       RequisiteOverridable SourcePath StopWhenUnneeded SubState TriggeredBy Triggers
+                                       UnitFileState WantedBy Wants'
                         ;;
                 esac
                 COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
-- 
1.8.2



More information about the systemd-devel mailing list