From: Eisuke Kawashima Date: Wed, 28 May 2025 10:25:17 +0000 (+0900) Subject: zsh-completion: generate completion for systemd-run from systemd-analyze X-Git-Tag: v258-rc1~119 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc6e9c548bf748fa8cbb479a27dcf64ba7689bc0;p=thirdparty%2Fsystemd.git zsh-completion: generate completion for systemd-run from systemd-analyze continuation of #37641 --- diff --git a/shell-completion/zsh/_systemd-run b/shell-completion/zsh/_systemd-run index 20b858957bd..1e24ff8e9f0 100644 --- a/shell-completion/zsh/_systemd-run +++ b/shell-completion/zsh/_systemd-run @@ -31,225 +31,9 @@ __systemctl() { (( $+functions[_systemd-run_properties] )) || _systemd-run_properties() { - local -a _properties=( - # man/systemd.exec.xml - ExecSearchPath= - WorkingDirectory= - RootDirectory= - RootImage= - RootImageOptions= - RootEphemeral= - RootHash= - RootHashSignature= - RootVerity= - RootImagePolicy= - MountImagePolicy= - ExtensionImagePolicy= - MountAPIVFS= - BindLogSockets= - ProtectProc= - ProcSubset= - BindPaths= - BindReadOnlyPaths= - MountImages= - ExtensionImages= - ExtensionDirectories= - User= - Group= - DynamicUser= - SupplementaryGroups= - SetLoginEnvironment= - PAMName= - CapabilityBoundingSet= - AmbientCapabilities= - NoNewPrivileges= - SecureBits= - SELinuxContext= - AppArmorProfile= - SmackProcessLabel= - LimitCPU= - LimitFSIZE= - LimitDATA= - LimitSTACK= - LimitCORE= - LimitRSS= - LimitNOFILE= - LimitAS= - LimitNPROC= - LimitMEMLOCK= - LimitLOCKS= - LimitSIGPENDING= - LimitMSGQUEUE= - LimitNICE= - LimitRTPRIO= - LimitRTTIME= - UMask= - CoredumpFilter= - KeyringMode= - OOMScoreAdjust= - TimerSlackNSec= - Personality= - IgnoreSIGPIPE= - Nice= - CPUSchedulingPolicy= - CPUSchedulingPriority= - CPUSchedulingResetOnFork= - CPUAffinity= - NUMAPolicy= - NUMAMask= - IOSchedulingClass= - IOSchedulingPriority= - ProtectSystem= - ProtectHome= - RuntimeDirectory= - StateDirectory= - CacheDirectory= - LogsDirectory= - ConfigurationDirectory= - RuntimeDirectoryMode= - StateDirectoryMode= - CacheDirectoryMode= - LogsDirectoryMode= - ConfigurationDirectoryMode= - RuntimeDirectoryPreserve= - TimeoutCleanSec= - ReadWritePaths= - ReadOnlyPaths= - InaccessiblePaths= - ExecPaths= - NoExecPaths= - TemporaryFileSystem= - PrivateTmp= - PrivateDevices= - PrivateNetwork= - NetworkNamespacePath= - PrivateIPC= - IPCNamespacePath= - MemoryKSM= - PrivatePIDs= - PrivateUsers= - ProtectHostname= - ProtectClock= - ProtectKernelTunables= - ProtectKernelModules= - ProtectKernelLogs= - ProtectControlGroups= - RestrictAddressFamilies= - RestrictFileSystems= - RestrictNamespaces= - DelegateNamespaces= - LockPersonality= - MemoryDenyWriteExecute= - RestrictRealtime= - RestrictSUIDSGID= - RemoveIPC= - PrivateMounts= - MountFlags= - SystemCallFilter= - SystemCallErrorNumber= - SystemCallArchitectures= - SystemCallLog= - Environment= - EnvironmentFile= - PassEnvironment= - UnsetEnvironment= - StandardInput= - StandardOutput= - StandardError= - StandardInputText= - StandardInputData= - LogLevelMax= - LogExtraFields= - LogRateLimitIntervalSec= - LogRateLimitBurst= - LogFilterPatterns= - LogNamespace= - SyslogIdentifier= - SyslogFacility= - SyslogLevel= - SyslogLevelPrefix= - TTYPath= - TTYReset= - TTYVHangup= - TTYColumns= - TTYRows= - TTYVTDisallocate= - LoadCredential= - LoadCredentialEncrypted= - ImportCredential= - SetCredential= - SetCredentialEncrypted= - UtmpIdentifier= - UtmpMode= - - # man/systemd.kill.xml - KillMode= - KillSignal= - RestartKillSignal= - SendSIGHUP= - SendSIGKILL= - FinalKillSignal= - WatchdogSignal= - - # man/systemd.resource-control.xml - CPUWeight= - StartupCPUWeight= - CPUQuota= - CPUQuotaPeriodSec= - AllowedCPUs= - StartupAllowedCPUs= - MemoryAccounting= - MemoryMin= - MemoryLow= - StartupMemoryLow= - DefaultStartupMemoryLow= - MemoryHigh= - StartupMemoryHigh= - MemoryMax= - StartupMemoryMax= - MemorySwapMax= - StartupMemorySwapMax= - MemoryZSwapMax= - StartupMemoryZSwapMax= - MemoryZSwapWriteback= - AllowedMemoryNodes= - StartupAllowedMemoryNodes= - TasksAccounting= - TasksMax= - IOAccounting= - IOWeight= - StartupIOWeight= - IODeviceWeight= - IOReadBandwidthMax= - IOWriteBandwidthMax= - IOReadIOPSMax= - IOWriteIOPSMax= - IODeviceLatencyTargetSec= - IPAccounting= - IPAddressAllow= - IPAddressDeny= - SocketBindAllow= - SocketBindDeny= - RestrictNetworkInterfaces= - NFTSet= - IPIngressFilterPath= - IPEgressFilterPath= - BPFProgram= - DeviceAllow= - DevicePolicy= - Slice= - Delegate= - DelegateSubgroup= - DisableControllers= - ManagedOOMSwap= - ManagedOOMMemoryPressure= - ManagedOOMMemoryPressureLimit= - ManagedOOMMemoryPressureDurationSec= - ManagedOOMPreference= - MemoryPressureWatch= - MemoryPressureThresholdSec= - CoredumpReceive= - ) + local -a _properties + _properties=($( systemd-analyze transient-settings scope service 2>/dev/null | + while read -r p; do [ -z "$p" ] || echo "$p="; done )) _values 'NAME=VALUE' "${_properties[@]}" }