[systemd-devel] [PATCH] shell-completion/bash/systemctl: add completion for properties
Dave Reisner
d at falconindy.com
Tue Apr 16 08:28:27 PDT 2013
On Tue, Apr 16, 2013 at 04:16:56PM +0200, harald at redhat.com wrote:
> 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'
Perhaps we can come up with a way of creating this list dynamically so
that we're not forever indebted to keeping this list up to date.
> ;;
> esac
> COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
> --
> 1.8.2
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
More information about the systemd-devel
mailing list