Re: [systemd-devel] ~/.local/share/systemd/user

2014-06-07 Thread William Giokas
On Sat, Jun 07, 2014 at 01:07:08PM +0300, Tanu Kaskinen wrote:
 Hi,
 
 Currently, systemd symlinks ~/.local/share/systemd/user to
 ~/.config/systemd/user. I'd prefer to not have that symlink. I'd want the
 two locations have different semantics, analogous to the separation between
 /usr/lib/systemd/user and /etc/systemd/user, i.e. service upstreams should
 install units to ~/.local/share/systemd/user and users should customize in
 ~/.config/systemd/user.

For me this is a directory, not a symlink.

 I suppose there are very few service upstreams that install their software
 to the user home directory, but I happen to be writing such software myself.
 My project is just a toy, though, but I think the general approach of
 installing a user service to the user home directory makes sense, as it
 avoids the need to have root access.
 
 So, would a patch that removes the symlinking be accepted?

So for user services there are 3 directories that packages can be,
checked in order:

  ~/.config/systemd/user
  /etc/systemd/user/
  /usr/lib/systemd/user

I don't see a reason to have a fourth one 'for packages' in a users home
directory.

Thanks,

-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpvxu0pe6Koi.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH WIP] shell-completion: Change zsh boot id completion

2014-02-21 Thread William Giokas
Previously we put the boot offset and boot ID into the completion, now
we use something similar to the coredumpctl completion, but only with
the boot offsets.
---

This is just something I'm working on, but would like some input. I'm fine
with it not having the boot ID's output, but that may be unacceptable.

 shell-completion/zsh/_journalctl | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 0d16a26..4467249 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -40,12 +40,9 @@ _journal_fields() {
 }
 
 _journal_boots() {
-  local -a _bootid _previousboots
-  _bootid=( ${(fao)$(_call_program bootid $service -F _BOOT_ID)}  )
-  _previousboots=( -{1..${#_bootid}} )
-  _alternative : \
-offsets:boot offsets:(${_previousboots[1,-2]}) \
-bootid:boot ids:(${_bootid[@]})
+  local -a _bootoff
+  _bootoff=( ${(foa)$(journalctl --list-boots | awk 'BEGIN{OFS=:} {print 
$1,$0}' 2/dev/null)} )
+  _describe -t pids 'boot offsets' _bootoff
 }
 
 _arguments -s \
-- 
1.9.0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCHv2 0/2] zsh-completion style fixes

2013-11-13 Thread William Giokas
Just style changes to the zsh completion. If either of these patches
are too large, you can view them at

  http://git.kaictl.net/wgiokas/systemd.git/?h=zsh-stylefix

v2: Added fixes to _bootctl

William Giokas (2):
  zsh-completion: Use same tab-width for all files
  zsh-completion: Function declarations follow style

 shell-completion/zsh/_bootctl  |  33 +-
 shell-completion/zsh/_hostnamectl  |  52 +--
 shell-completion/zsh/_journalctl   | 169 -
 shell-completion/zsh/_kernel-install   |  38 +-
 shell-completion/zsh/_localectl| 143 
 shell-completion/zsh/_loginctl | 133 +++
 shell-completion/zsh/_machinectl   |  71 ++--
 shell-completion/zsh/_sd_hosts_or_user_at_host |   5 +-
 shell-completion/zsh/_sd_machines  |   4 +-
 shell-completion/zsh/_sd_outputmodes   |   1 +
 shell-completion/zsh/_systemctl| 466 +
 shell-completion/zsh/_systemd  | 154 
 shell-completion/zsh/_systemd-analyze  |  71 ++--
 shell-completion/zsh/_systemd-coredumpctl  |  60 ++--
 shell-completion/zsh/_systemd-delta|  22 +-
 shell-completion/zsh/_systemd-inhibit  |  53 +--
 shell-completion/zsh/_systemd-nspawn   |  40 ++-
 shell-completion/zsh/_systemd-run  |  10 +-
 shell-completion/zsh/_systemd-tmpfiles |  15 +-
 shell-completion/zsh/_timedatectl  | 106 +++---
 shell-completion/zsh/_udevadm  | 234 +++--
 21 files changed, 969 insertions(+), 911 deletions(-)

-- 
1.8.5.rc1.17.g0ecd94d

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCHv2 2/2] zsh-completion: Function declarations follow style

2013-11-13 Thread William Giokas
Follow the instructions in CODING_STYLE for the zsh completion
functions.
---
 shell-completion/zsh/_hostnamectl |  3 ++-
 shell-completion/zsh/_journalctl  | 12 
 shell-completion/zsh/_kernel-install  |  6 --
 shell-completion/zsh/_localectl   | 12 
 shell-completion/zsh/_sd_machines |  3 ++-
 shell-completion/zsh/_systemctl   |  9 ++---
 shell-completion/zsh/_systemd-analyze |  6 --
 shell-completion/zsh/_systemd-coredumpctl |  3 ++-
 shell-completion/zsh/_systemd-delta   |  3 ++-
 shell-completion/zsh/_systemd-inhibit |  6 --
 shell-completion/zsh/_systemd-nspawn  |  3 ++-
 shell-completion/zsh/_systemd-run |  9 ++---
 shell-completion/zsh/_timedatectl | 15 ++-
 shell-completion/zsh/_udevadm | 27 ++-
 14 files changed, 78 insertions(+), 39 deletions(-)

diff --git a/shell-completion/zsh/_hostnamectl 
b/shell-completion/zsh/_hostnamectl
index 7d7baeb..c7a5ec0 100644
--- a/shell-completion/zsh/_hostnamectl
+++ b/shell-completion/zsh/_hostnamectl
@@ -1,6 +1,7 @@
 #compdef hostnamectl
 
-_hostnamectl_command() {
+_hostnamectl_command()
+{
 local -a _hostnamectl_cmds
 _hostnamectl_cmds=(
 status:Show current hostname settings
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index b518e35..fcb7874 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -1,6 +1,7 @@
 #compdef journalctl
 
-_list_fields() {
+_list_fields()
+{
 local -a journal_fields
 journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}
 ERRNO SYSLOG_{FACILITY,IDENTIFIER,PID}
@@ -20,7 +21,8 @@ _list_fields() {
 esac
 }
 
-_journal_none() {
+_journal_none()
+{
 local -a _commands _files _jrnl_none
 # Setting use-cache will slow this down considerably
 _commands=( ${$(_call_program commands $service -F _EXE 
2/dev/null)} )
@@ -31,7 +33,8 @@ _journal_none() {
 'fields:fields:_list_fields'
 }
 
-_journal_fields() {
+_journal_fields()
+{
 local -a _fields cmd
 cmd=(journalctl -F ${@[-1]} 2/dev/null )
 _fields=( ${(f)$(_call_program fields $cmd[@])} )
@@ -39,7 +42,8 @@ _journal_fields() {
 _describe 'possible values' _fields
 }
 
-_journal_boots() {
+_journal_boots()
+{
 local -a _bootid _previousboots
 _bootid=( ${(fao)$(_call_program bootid $service -F _BOOT_ID)}  )
 _previousboots=( -{1..${#_bootid}} )
diff --git a/shell-completion/zsh/_kernel-install 
b/shell-completion/zsh/_kernel-install
index 3bc29fd..2f1adb5 100644
--- a/shell-completion/zsh/_kernel-install
+++ b/shell-completion/zsh/_kernel-install
@@ -1,6 +1,7 @@
 #compdef kernel-install
 
-_images(){
+_images()
+{
 if [[ $words[2] == remove ]]; then
 _message 'No more options'
 else
@@ -8,7 +9,8 @@ _images(){
 fi
 }
 
-_kernels(){
+_kernels()
+{
 read _MACHINE_ID  /etc/machine-id
 _kernel=( /lib/modules/[0-9]* )
 if [[ $cmd == remove  -n $_MACHINE_ID ]]; then
diff --git a/shell-completion/zsh/_localectl b/shell-completion/zsh/_localectl
index 1e3cf03..b94c9d3 100644
--- a/shell-completion/zsh/_localectl
+++ b/shell-completion/zsh/_localectl
@@ -1,6 +1,7 @@
 #compdef localectl
 
-_localectl_set-locale() {
+_localectl_set-locale()
+{
 local -a _confs _locales
 local expl suf
 _locales=( ${(f)$(_call_program locales $service list-locales)} )
@@ -15,7 +16,8 @@ _localectl_set-locale() {
 fi
 }
 
-_localectl_set-keymap() {
+_localectl_set-keymap()
+{
 local -a _keymaps
 _keymaps=( ${(f)$(_call_program locales $service list-keymaps)} )
 if (( CURRENT = 3 )); then
@@ -25,7 +27,8 @@ _localectl_set-keymap() {
 fi
 }
 
-_localectl_set-x11-keymap() {
+_localectl_set-x11-keymap()
+{
 if (( $+commands[pkg-config] )); then
 local -a _file _layout _model _variant _options
 local _xorg_lst
@@ -50,7 +53,8 @@ _localectl_set-x11-keymap() {
 fi
 }
 
-_localectl_command() {
+_localectl_command()
+{
 local -a _localectl_cmds
 _localectl_cmds=(
 'status:Show current locale settings'
diff --git a/shell-completion/zsh/_sd_machines 
b/shell-completion/zsh/_sd_machines
index df2f462..e2e5c04 100644
--- a/shell-completion/zsh/_sd_machines
+++ b/shell-completion/zsh/_sd_machines
@@ -1,5 +1,6 @@
 #autoload
-__get_machines () {
+__get_machines()
+{
 machinectl --full --no-pager list | {while read -r a b; do echo $a; 
done;};
 }
 
diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl
index 133a550..1ab66ce 100644
--- a/shell-completion/zsh/_systemctl
+++ b/shell-completion/zsh/_systemctl
@@ -121,7 +121,8 @@ _systemctl_really_all_units()
 fi
 }
 

[systemd-devel] [PATCH 2/2] zsh-completion: Function declarations follow style

2013-11-11 Thread William Giokas
Follow the instructions in CODING_STYLE for the zsh completion
functions.
---
 shell-completion/zsh/_hostnamectl |  3 ++-
 shell-completion/zsh/_journalctl  | 12 
 shell-completion/zsh/_kernel-install  |  6 --
 shell-completion/zsh/_localectl   | 12 
 shell-completion/zsh/_sd_machines |  3 ++-
 shell-completion/zsh/_systemctl   |  9 ++---
 shell-completion/zsh/_systemd-analyze |  6 --
 shell-completion/zsh/_systemd-coredumpctl |  3 ++-
 shell-completion/zsh/_systemd-delta   |  3 ++-
 shell-completion/zsh/_systemd-inhibit |  6 --
 shell-completion/zsh/_systemd-nspawn  |  3 ++-
 shell-completion/zsh/_systemd-run |  9 ++---
 shell-completion/zsh/_timedatectl | 15 ++-
 shell-completion/zsh/_udevadm | 27 ++-
 14 files changed, 78 insertions(+), 39 deletions(-)

diff --git a/shell-completion/zsh/_hostnamectl 
b/shell-completion/zsh/_hostnamectl
index 7d7baeb..c7a5ec0 100644
--- a/shell-completion/zsh/_hostnamectl
+++ b/shell-completion/zsh/_hostnamectl
@@ -1,6 +1,7 @@
 #compdef hostnamectl
 
-_hostnamectl_command() {
+_hostnamectl_command()
+{
 local -a _hostnamectl_cmds
 _hostnamectl_cmds=(
 status:Show current hostname settings
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index b518e35..fcb7874 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -1,6 +1,7 @@
 #compdef journalctl
 
-_list_fields() {
+_list_fields()
+{
 local -a journal_fields
 journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}
 ERRNO SYSLOG_{FACILITY,IDENTIFIER,PID}
@@ -20,7 +21,8 @@ _list_fields() {
 esac
 }
 
-_journal_none() {
+_journal_none()
+{
 local -a _commands _files _jrnl_none
 # Setting use-cache will slow this down considerably
 _commands=( ${$(_call_program commands $service -F _EXE 
2/dev/null)} )
@@ -31,7 +33,8 @@ _journal_none() {
 'fields:fields:_list_fields'
 }
 
-_journal_fields() {
+_journal_fields()
+{
 local -a _fields cmd
 cmd=(journalctl -F ${@[-1]} 2/dev/null )
 _fields=( ${(f)$(_call_program fields $cmd[@])} )
@@ -39,7 +42,8 @@ _journal_fields() {
 _describe 'possible values' _fields
 }
 
-_journal_boots() {
+_journal_boots()
+{
 local -a _bootid _previousboots
 _bootid=( ${(fao)$(_call_program bootid $service -F _BOOT_ID)}  )
 _previousboots=( -{1..${#_bootid}} )
diff --git a/shell-completion/zsh/_kernel-install 
b/shell-completion/zsh/_kernel-install
index 3bc29fd..2f1adb5 100644
--- a/shell-completion/zsh/_kernel-install
+++ b/shell-completion/zsh/_kernel-install
@@ -1,6 +1,7 @@
 #compdef kernel-install
 
-_images(){
+_images()
+{
 if [[ $words[2] == remove ]]; then
 _message 'No more options'
 else
@@ -8,7 +9,8 @@ _images(){
 fi
 }
 
-_kernels(){
+_kernels()
+{
 read _MACHINE_ID  /etc/machine-id
 _kernel=( /lib/modules/[0-9]* )
 if [[ $cmd == remove  -n $_MACHINE_ID ]]; then
diff --git a/shell-completion/zsh/_localectl b/shell-completion/zsh/_localectl
index 1e3cf03..b94c9d3 100644
--- a/shell-completion/zsh/_localectl
+++ b/shell-completion/zsh/_localectl
@@ -1,6 +1,7 @@
 #compdef localectl
 
-_localectl_set-locale() {
+_localectl_set-locale()
+{
 local -a _confs _locales
 local expl suf
 _locales=( ${(f)$(_call_program locales $service list-locales)} )
@@ -15,7 +16,8 @@ _localectl_set-locale() {
 fi
 }
 
-_localectl_set-keymap() {
+_localectl_set-keymap()
+{
 local -a _keymaps
 _keymaps=( ${(f)$(_call_program locales $service list-keymaps)} )
 if (( CURRENT = 3 )); then
@@ -25,7 +27,8 @@ _localectl_set-keymap() {
 fi
 }
 
-_localectl_set-x11-keymap() {
+_localectl_set-x11-keymap()
+{
 if (( $+commands[pkg-config] )); then
 local -a _file _layout _model _variant _options
 local _xorg_lst
@@ -50,7 +53,8 @@ _localectl_set-x11-keymap() {
 fi
 }
 
-_localectl_command() {
+_localectl_command()
+{
 local -a _localectl_cmds
 _localectl_cmds=(
 'status:Show current locale settings'
diff --git a/shell-completion/zsh/_sd_machines 
b/shell-completion/zsh/_sd_machines
index df2f462..e2e5c04 100644
--- a/shell-completion/zsh/_sd_machines
+++ b/shell-completion/zsh/_sd_machines
@@ -1,5 +1,6 @@
 #autoload
-__get_machines () {
+__get_machines()
+{
 machinectl --full --no-pager list | {while read -r a b; do echo $a; 
done;};
 }
 
diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl
index 133a550..1ab66ce 100644
--- a/shell-completion/zsh/_systemctl
+++ b/shell-completion/zsh/_systemctl
@@ -121,7 +121,8 @@ _systemctl_really_all_units()
 fi
 }
 

[systemd-devel] [PATCH] zsh-completion: Move machine listing to autoload

2013-11-07 Thread William Giokas
Instead of having two different listings of machines, use an autoloaded
function that can be used by other shell completions in the future. It
will also allow editing a single file to change the way machinectl and
systemd-run completion for machines.
---

An extension of the previous zsh completion patch from Ronny Chevalier.

 shell-completion/zsh/_machinectl  |  7 +--
 shell-completion/zsh/_sd_machines | 13 +
 shell-completion/zsh/_systemd-run | 17 +
 3 files changed, 15 insertions(+), 22 deletions(-)
 create mode 100644 shell-completion/zsh/_sd_machines

diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl
index 2e5e05c..026d74f 100644
--- a/shell-completion/zsh/_machinectl
+++ b/shell-completion/zsh/_machinectl
@@ -19,12 +19,7 @@
   case $cmd in
 list) msg=no options ;;
 *)
-  _machines=( ${(foa)$(machinectl list | awk '{print $1}')} )
-  if [[ -n $_machines ]]; then
-_describe 'machines' _machines
-  else
-_message 'no machines'
-  fi
+  _sd_machines
   esac
 else
   _message no more options
diff --git a/shell-completion/zsh/_sd_machines 
b/shell-completion/zsh/_sd_machines
new file mode 100644
index 000..1d64d13
--- /dev/null
+++ b/shell-completion/zsh/_sd_machines
@@ -0,0 +1,13 @@
+#autoload
+__get_machines () {
+machinectl --full --no-pager list | {while read -r a b; do echo $a; 
done;};
+}
+
+local -a _machines
+_machines=(${(fo)$(__get_machines)})
+typeset -U _machines
+if [[ -n $_machines ]]; then
+_describe 'machines' _machines
+else
+_message 'no machines'
+fi
diff --git a/shell-completion/zsh/_systemd-run 
b/shell-completion/zsh/_systemd-run
index 4bfbd19..9bb7700 100644
--- a/shell-completion/zsh/_systemd-run
+++ b/shell-completion/zsh/_systemd-run
@@ -18,27 +18,12 @@ __slices () {
 _describe 'slices' _slices
 }
 
-__get_machines () {
-machinectl --full --no-pager list | {while read -r a b; do echo $a; 
done;};
-}
-
-__machines () {
-local -a _machines
-_machines=(${(fo)$(__get_machines)})
-typeset -U _machines
-if [[ -n $_machines ]]; then
-_describe 'machines' _machines
-else
-_message 'no machines'
-fi
-}
-
 _arguments \
 {-h,--help}'[Show help message]' \
 '--version[Show package version]' \
 '--user[Run as user unit]' \
 {-H+,--host=}'[Operate on remote 
host]:[user@]host:_sd_hosts_or_user_at_host' \
-{-M+,--machine=}'[Operate on local container]:machines:__machines' \
+{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
 '--scope[Run this as scope rather than service]' \
 '--unit=[Run under the specified unit name]:unit name' \
 '--description=[Description for unit]:description' \
-- 
1.8.5.rc0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 2/2] zsh-completion: Move output modes to autoload

2013-11-07 Thread William Giokas
---
Added on to the previous patch.

 shell-completion/zsh/_journalctl | 8 +---
 shell-completion/zsh/_sd_outputmodes | 5 +
 shell-completion/zsh/_systemctl  | 8 +---
 3 files changed, 7 insertions(+), 14 deletions(-)
 create mode 100644 shell-completion/zsh/_sd_outputmodes

diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 29ff3e3..d94c1e4 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -1,11 +1,5 @@
 #compdef journalctl
 
-_outputmodes() {
-local -a _output_opts
-_output_opts=(short short-monotonic verbose export json json-pretty 
json-see cat)
-_describe -t output 'output mode' _output_opts || compadd $@
-}
-
 _list_fields() {
 local -a journal_fields
 journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}
@@ -65,7 +59,7 @@ _arguments -s \
 {-n+,--lines=}'[Number of journal entries to show]:integer' \
 '--no-tail[Show all lines, even in follow mode]' \
 {-r,--reverse}'[Reverse output]' \
-{-o+,--output=}'[Change journal output mode]:output modes:_outputmodes' \
+{-o+,--output=}'[Change journal output mode]:output modes:_sd_outputmodes' 
\
 {-x,--catalog}'[Show explanatory texts with each log line]' \
 {-q,--quiet}[Don't show privilege warning] \
 {-m,--merge}'[Show entries from all available journals]' \
diff --git a/shell-completion/zsh/_sd_outputmodes 
b/shell-completion/zsh/_sd_outputmodes
new file mode 100644
index 000..dae8a5c
--- /dev/null
+++ b/shell-completion/zsh/_sd_outputmodes
@@ -0,0 +1,5 @@
+#autoload
+
+local -a _output_opts
+_output_opts=(short short-monotonic verbose export json json-pretty json-see 
cat)
+_describe -t output 'output mode' _output_opts || compadd $@
diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl
index 3959cd5..560a548 100644
--- a/shell-completion/zsh/_systemctl
+++ b/shell-completion/zsh/_systemctl
@@ -288,12 +288,6 @@ _systemctl_caching_policy()
   return 1
 }
 
-_outputmodes() {
-local -a _output_opts
-_output_opts=(short short-monotonic verbose export json json-pretty 
json-see cat)
-_describe -t output 'output mode' _output_opts || compadd $@
-}
-
 _unit_states() {
 local -a _states
 _states=(loaded failed active inactive not-found listening running waiting 
plugged mounted exited dead masked)
@@ -341,6 +335,6 @@ _arguments -s \
 {-H+,--host=}'[Show information for remote 
host]:userathost:_sd_hosts_or_user_at_host' \
 {-P,--privileged}'[Acquire privileges before execution]' \
 {-n+,--lines=}'[Journal entries to show]:number of entries' \
-{-o+,--output=}'[Change journal output mode]:modes:_outputmodes' \
+{-o+,--output=}'[Change journal output mode]:modes:_sd_outputmodes' \
 '--plain[When used with list-dependencies, print output as a list]' \
 '*::systemctl command:_systemctl_command'
-- 
1.8.5.rc0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [wgiokas@wst420: Re: [PATCH] zsh-completion: add missing options for systemd-run]

2013-10-31 Thread William Giokas
Aand I hit the wrong button. Here it is to the list.

- Forwarded message from William Giokas wgiokas@wst420 -
On Thu, Oct 31, 2013 at 07:24:28PM +0100, Ronny Chevalier wrote:
 ---
  shell-completion/zsh/_systemd-run | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/shell-completion/zsh/_systemd-run 
 b/shell-completion/zsh/_systemd-run
 index 0c81c54..d550f22 100644
 --- a/shell-completion/zsh/_systemd-run
 +++ b/shell-completion/zsh/_systemd-run
 @@ -22,6 +22,8 @@ _arguments \
  {-h,--help}'[Show help message]' \
  '--version[Show package version]' \
  '--user[Run as user unit]' \
 +{-H+,--host=}'[Operate on remote host]:[user@]host:_hosts' \

Nope. Look at the other -H/--host completions. It should use the
_sd_hosts_or_user_at_host function in the zsh/ directory. (See
_systemctl.)

 +{-M+,--machine=}'[Operate on local container]:container' \

And look at the _machinectl stuff for getting a list of containers.

  '--scope[Run this as scope rather than service]' \
  '--unit=[Run under the specified unit name]:unit name' \
  '--description=[Description for unit]:description' \
 -- 
 1.8.4.2
 
- End forwarded message -

Thanks,
-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpKk5VUWBTbM.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH v2] zsh-completion: add missing options for systemd-run

2013-10-31 Thread William Giokas
On Thu, Oct 31, 2013 at 08:46:29PM +0100, Ronny Chevalier wrote:
 ---
  shell-completion/zsh/_systemd-run | 17 +
  1 file changed, 17 insertions(+)
 
 diff --git a/shell-completion/zsh/_systemd-run 
 b/shell-completion/zsh/_systemd-run
 index 0c81c54..4bfbd19 100644
 --- a/shell-completion/zsh/_systemd-run
 +++ b/shell-completion/zsh/_systemd-run
 @@ -18,10 +18,27 @@ __slices () {
  _describe 'slices' _slices
  }
  
 +__get_machines () {
 +machinectl --full --no-pager list | {while read -r a b; do echo $a; 
 done;};
 +}
 +
 +__machines () {
 +local -a _machines
 +_machines=(${(fo)$(__get_machines)})
 +typeset -U _machines
 +if [[ -n $_machines ]]; then
 +_describe 'machines' _machines
 +else
 +_message 'no machines'
 +fi
 +}
 +

Much better. Now one thing that would make this amazing is if you could
make __machines an autoloaded file, possibly _sd_machines, that can be
used in multiple zsh completions so that work doesn't have to be
duplicated between this and _machinectl, similar to the work done with
_sd_hosts_or_user_at_host. And possibly split this into two patches, one
that just adds the -H/--host line and another that adds the -M/--machine
line, the _sd_machines file and has _machinectl use _sd_machines.

Just a thought.


  _arguments \
  {-h,--help}'[Show help message]' \
  '--version[Show package version]' \
  '--user[Run as user unit]' \
 +{-H+,--host=}'[Operate on remote 
 host]:[user@]host:_sd_hosts_or_user_at_host' \
 +{-M+,--machine=}'[Operate on local container]:machines:__machines' \
  '--scope[Run this as scope rather than service]' \
  '--unit=[Run under the specified unit name]:unit name' \
  '--description=[Description for unit]:description' \
 -- 
 1.8.4.2

Thanks,

-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpO3fEnzM1YA.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH v2] zsh-completion: add missing options for systemd-run

2013-10-31 Thread William Giokas
On Thu, Oct 31, 2013 at 09:54:05PM +0100, Ronny Chevalier wrote:
 2013/10/31 William Giokas 1007...@gmail.com:
  Much better. Now one thing that would make this amazing is if you could
  make __machines an autoloaded file, possibly _sd_machines, that can be
  used in multiple zsh completions so that work doesn't have to be
  duplicated between this and _machinectl, similar to the work done with
  _sd_hosts_or_user_at_host. And possibly split this into two patches, one
  that just adds the -H/--host line and another that adds the -M/--machine
  line, the _sd_machines file and has _machinectl use _sd_machines.
 
  Just a thought.
 Yes okay, but I think we should keep this patch and send an other one
 which add the _sd_machines file, and use it in _systemd-run and
 _machinectl, like you said. Otherwise I don't see the point of a patch
 adding the host option, but not the other one missing.
 This second patch would also fix some other parts of the completion.
 Like in _systemd-nspawn where we could use _users for --user and make
 _outputmodes an autoloaded file, since both _journalctl and _systemctl
 use it.

Okay. +1 from me.

-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpCZQ9bTL_qy.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] zsh_completion: Fix --user-unit completion

2013-08-24 Thread William Giokas
_SYSTEMD_USER_UNIT in the --user-unit flag argument should instead be
USER_UNIT. It should also have an optional `=` between the flag and the
argument.
---

I don't actually know if this is what is supposed to be searched for, but
with _SYSTEMD_USER_UNIT, nothing is displayed (I don't see anything that
has a _SYSTEMD_USER_UNIT field). This could be totally wrong...

 shell-completion/zsh/_journalctl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 7c5cc13..73646b5 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -13,7 +13,7 @@ _list_fields() {
 _{P,U,G}ID _COMM _EXE _CMDLINE
 _AUDIT_{SESSION,LOGINUID}
 _SYSTEMD_{CGROUP,SESSION,UNIT,OWNER_UID}
-_SYSTEMD_USER_UNIT
+_SYSTEMD_USER_UNIT USER_UNIT
 _SELINUX_CONTEXT _SOURCE_REALTIME_TIMESTAMP
 _{BOOT,MACHINE}_ID _HOSTNAME _TRANSPORT
 _KERNEL_{DEVICE,SUBSYSTEM}
@@ -72,7 +72,7 @@ _arguments -s \
 {-b+,--boot=}'[Show data only from the specified boot or offset]:boot id 
or offset:_journal_boots' \
 {-k,--dmesg}'[Show only kernel messages, Implies -b]' \
 {-u+,--unit=}'[Show data only from the specified 
unit]:units:_journal_fields _SYSTEMD_UNIT' \
-'--user-unit[Show data only from the specified user session 
unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \
+'--user-unit=[Show data only from the specified user session 
unit]:units:_journal_fields USER_UNIT' \
 {-p+,--priority=}'[Show only messages within the specified priority 
range]:priority:_journal_fields PRIORITY' \
 {-c+,--cursor=}'[Start showing entries from specified 
cursor]:cursors:_journal_fields __CURSORS' \
 '--after-cursor=[Start showing entries from the location in the journal 
after the cursor]:cursors:_journal_fields __CURSORS' \
-- 
1.8.4.557.g34b3a2e

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] zsh_completion: Fix single letter args

2013-08-20 Thread William Giokas
Things like -n to specify the lines to show with systemctl and
journalctl accepts syntax like:

  journalctl -n4
  systemctl -n14

Previously, typing `-nXX tab` where XX is a number, zsh would try to
complete an integer. Now it will see the XX and use the _journalctl_none
completion. This is also how any of the single letter options that take
arguments work as well.
---
 shell-completion/zsh/_hostnamectl |  2 +-
 shell-completion/zsh/_journalctl  | 14 +++---
 shell-completion/zsh/_localectl   |  2 +-
 shell-completion/zsh/_loginctl|  6 +++---
 shell-completion/zsh/_machinectl  |  6 +++---
 shell-completion/zsh/_systemctl   | 12 ++--
 shell-completion/zsh/_systemd |  8 
 shell-completion/zsh/_systemd-coredumpctl |  4 ++--
 shell-completion/zsh/_systemd-delta   |  2 +-
 shell-completion/zsh/_systemd-nspawn  |  8 
 shell-completion/zsh/_timedatectl |  2 +-
 11 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/shell-completion/zsh/_hostnamectl 
b/shell-completion/zsh/_hostnamectl
index 9d01495..45b9597 100644
--- a/shell-completion/zsh/_hostnamectl
+++ b/shell-completion/zsh/_hostnamectl
@@ -28,5 +28,5 @@ _arguments -s \
 '--static[Only set static hostname]' \
 '--pretty[Only set pretty hostname]' \
 '--no-ask-password[Do not prompt for password]' \
-{-H,--host=}'[Operate on remote 
host]:userathost:_sd_hosts_or_user_at_host' \
+{-H+,--host=}'[Operate on remote 
host]:userathost:_sd_hosts_or_user_at_host' \
 '*::hostnamectl commands:_hostnamectl_command'
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 212bfdb..7c5cc13 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -62,26 +62,26 @@ _arguments -s \
 {-a,--all}'[Show all fields, including long and unprintable]' \
 {-f,--follow}'[Follow journal]' \
 {-e,--pager-end}'[Jump to the end of the journal in the pager]' \
-{-n,--lines=}'[Number of journal entries to show]:integer' \
+{-n+,--lines=}'[Number of journal entries to show]:integer' \
 '--no-tail[Show all lines, even in follow mode]' \
 {-r,--reverse}'[Reverse output]' \
-{-o,--output=}'[Change journal output mode]:output modes:_outputmodes' \
+{-o+,--output=}'[Change journal output mode]:output modes:_outputmodes' \
 {-x,--catalog}'[Show explanatory texts with each log line]' \
 {-q,--quiet}[Don't show privilege warning] \
 {-m,--merge}'[Show entries from all available journals]' \
-{-b,--boot=}'[Show data only from the specified boot or offset]:boot id or 
offset:_journal_boots' \
+{-b+,--boot=}'[Show data only from the specified boot or offset]:boot id 
or offset:_journal_boots' \
 {-k,--dmesg}'[Show only kernel messages, Implies -b]' \
-{-u,--unit=}'[Show data only from the specified 
unit]:units:_journal_fields _SYSTEMD_UNIT' \
+{-u+,--unit=}'[Show data only from the specified 
unit]:units:_journal_fields _SYSTEMD_UNIT' \
 '--user-unit[Show data only from the specified user session 
unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \
-{-p,--priority=}'[Show only messages within the specified priority 
range]:priority:_journal_fields PRIORITY' \
-{-c,--cursor=}'[Start showing entries from specified 
cursor]:cursors:_journal_fields __CURSORS' \
+{-p+,--priority=}'[Show only messages within the specified priority 
range]:priority:_journal_fields PRIORITY' \
+{-c+,--cursor=}'[Start showing entries from specified 
cursor]:cursors:_journal_fields __CURSORS' \
 '--after-cursor=[Start showing entries from the location in the journal 
after the cursor]:cursors:_journal_fields __CURSORS' \
 '--since=[Start showing entries newer or of the specified date]:-MM-DD 
HH\:MM\:SS' \
 '--until=[Stop showing entries older or of the specified date]:-MM-DD 
HH\:MM\:SS' \
 {-F,--field=}'[List all values a certain field takes]:Fields:_list_fields' 
\
 '--system[Show system and kernel messages]' \
 '--user[Show messages from user services]' \
-{-D,--directory=}'[Show journal files from 
directory]:directories:_directories' \
+{-D+,--directory=}'[Show journal files from 
directory]:directories:_directories' \
 '--file=[Operate on specified journal files]:file:_files' \
 '--root=[Operate on catalog hierarchy under specified 
directory]:directories:_directories' \
 '--new-id128[Generate a new 128 Bit ID]' \
diff --git a/shell-completion/zsh/_localectl b/shell-completion/zsh/_localectl
index 321e418..3d76bb0 100644
--- a/shell-completion/zsh/_localectl
+++ b/shell-completion/zsh/_localectl
@@ -79,5 +79,5 @@ _arguments \
 --no-convert[Don't convert keyboard mappings] \
 '--no-pager[Do not pipe output into a pager]' \
 '--no-ask-password[Do not prompt for password]' \
-{-H,--host=}'[Operate on remote 
host]:userathost:_sd_hosts_or_user_at_host' \
+

[systemd-devel] [PATCH 1/3 v2] zsh_completion: Allow specifying multiple arguments

2013-08-14 Thread William Giokas
Some of the options in systemd can take multiple arguments, such as
systemctl's --type option. Previously, you would only be able to
complete a single type after the -t, but now zsh will continue to
complete the types, separating them by commas.

systemd-inhibit's --what command has colon (:), and that has been taken
into account.
---

Just rebased.

 Makefile.am   |  1 +
 shell-completion/zsh/_systemctl   | 16 ++--
 shell-completion/zsh/_systemd | 11 +--
 shell-completion/zsh/_systemd-delta   | 15 +++
 shell-completion/zsh/_systemd-inhibit |  8 +++-
 5 files changed, 38 insertions(+), 13 deletions(-)
 create mode 100644 shell-completion/zsh/_systemd-delta

diff --git a/Makefile.am b/Makefile.am
index 641e92f..5d35993 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -351,6 +351,7 @@ dist_zshcompletion_DATA = \
shell-completion/zsh/_systemd-nspawn \
shell-completion/zsh/_systemd-analyze \
shell-completion/zsh/_sd_hosts_or_user_at_host \
+   shell-completion/zsh/_systemd-delta \
shell-completion/zsh/_systemd
 
 dist_sysctl_DATA = \
diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl
index dbe168a..cc2df3c 100644
--- a/shell-completion/zsh/_systemctl
+++ b/shell-completion/zsh/_systemctl
@@ -294,11 +294,23 @@ _outputmodes() {
 _describe -t output 'output mode' _output_opts || compadd $@
 }
 
+_unit_states() {
+local -a _states
+_states=(loaded failed active inactive not-found listening running waiting 
plugged mounted exited dead masked)
+_values -s , ${_states[@]}
+}
+
+_unit_types() {
+local -a _types
+_types=(automount device mount path service snapshot socket swap target 
timer)
+_values -s , ${_types[@]}
+}
+
 _arguments -s \
 {-h,--help}'[Show help]' \
 '--version[Show package version]' \
-{-t,--type=}'[List only units of a particular type]:unit type:(automount 
device mount path service snapshot socket swap target timer)' \
-'--state=[Display units in the specified state]:unit state:(loaded failed 
active inactive not-found listening running waiting plugged mounted exited dead 
masked)' \
+{-t,--type=}'[List only units of a particular type]:unit type:_unit_types' 
\
+'--state=[Display units in the specifyied state]:unit state:_unit_states' \
 \*{-p,--property=}'[Show only properties by specific name]:unit property' \
 {-a,--all}'[Show all units/properties, including dead/empty ones]' \
 '--reverse[Show reverse dependencies]' \
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 7aab52d..fe39de8 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,4 +1,4 @@
-#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-delta systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tty-ask-password-agent
+#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tty-ask-password-agent
 
 _ctls()
 {
@@ -45,15 +45,6 @@ _ctls()
 {-b,--batch}'[Run in batch mode, accepting no input]' \
 '--depth=[Maximum traversal depth]'
 ;;
-systemd-delta)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-'--no-pager[Do not pipe output into a pager]' \
-'--diff=[Show a diff when overridden files differ]:boolean:(1 
0)' \
-{-t,--type=}'[Only display a selected set of override 
types]:types:(masked equivalent redirected overridden unchanged)' \
-':SUFFIX:(tmpfiles.d sysctl.d systemd/system)'
-;;
 systemd-detect-virt)
 _arguments \
 {-h,--help}'[Show this help]' \
diff --git a/shell-completion/zsh/_systemd-delta 
b/shell-completion/zsh/_systemd-delta
new file mode 100644
index 000..6abb6fc
--- /dev/null
+++ b/shell-completion/zsh/_systemd-delta
@@ -0,0 +1,15 @@
+#compdef systemd-delta
+
+_delta_type() {
+local -a _delta_types
+_delta_types=(masked equivalent redirected overridden unchanged)
+_values -s , ${_delta_types[@]}
+}
+
+_arguments \
+{-h,--help}'[Show this help]' \
+'--version[Show package version]' \
+'--no-pager[Do not pipe output into a pager]' \
+'--diff=[Show a diff when overridden files differ]:boolean:(1 0)' \
+{-t,--type=}'[Only display a selected set of override 
types]:types:_delta_type' \
+':SUFFIX:(tmpfiles.d sysctl.d systemd/system)'
diff --git a/shell-completion/zsh/_systemd-inhibit 
b/shell-completion/zsh/_systemd-inhibit
index 7953455..1ecb6dc 100644
--- a/shell-completion/zsh/_systemd-inhibit
+++ b/shell-completion/zsh/_systemd-inhibit
@@ -16,10 +16,16 @@ _systemd_inhibit_command(){
 fi
 }
 
+_inhibit_what() {
+local _inhibit
+_inhibit=(shutdown sleep idle 

[systemd-devel] [PATCH 3/3 v2] zsh_completion: Remove ctls function from _systemd

2013-08-14 Thread William Giokas
The _ctls function in the main _systemd file is not needed.
---
 shell-completion/zsh/_systemd | 163 --
 1 file changed, 79 insertions(+), 84 deletions(-)

diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index fe39de8..e954c3e 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,88 +1,83 @@
 #compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tty-ask-password-agent
 
-_ctls()
-{
-local curcontext=$curcontext state lstate line
-case $service in
-systemd-ask-password)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--icon=[Icon name]' \
-'--timeout=[Timeout in sec]' \
-'--no-tty[Ask question via agent even on TTY]' \
-'--accept-cached[Accept cached passwords]' \
-'--multiple[List multiple passwords if available]'
-;;
-systemd-cat)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version.]' \
-{-t,--identifier=}'[Set syslog identifier.]' \
-{-p,--priority=}'[Set priority value.]:value:({0..7})' \
-'--level-prefix=[Control whether level prefix shall be 
parsed.]:boolean:(1 0)' \
-':Message'
-;;
-systemd-cgls)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-'--no-pager[Do not pipe output into a pager]' \
-{-a,--all}'[Show all groups, including empty]' \
-'-k[Include kernel threads in output]' \
-':cgroups:(cpuset cpu cpuacct memory devices freezer net_cls 
blkio)'
-;;
-systemd-cgtop)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Print version and exit]' \
-'(-c -m -i -t)-p[Order by path]' \
-'(-c -p -m -i)-t[Order by number of tasks]' \
-'(-m -p -i -t)-c[Order by CPU load]' \
-'(-c -p -i -t)-m[Order by memory load]' \
-'(-c -m -p -t)-i[Order by IO load]' \
-{-d,--delay=}'[Specify delay]' \
-{-n,--iterations=}'[Run for N iterations before exiting]' \
-{-b,--batch}'[Run in batch mode, accepting no input]' \
-'--depth=[Maximum traversal depth]'
-;;
-systemd-detect-virt)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-{-c,--container}'[Only detect whether we are run in a 
container]' \
-{-v,--vm}'[Only detect whether we are run in a VM]' \
-{-q,--quiet}[Don't output anything, just set return value]
-;;
-systemd-machine-id-setup)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]'
-;;
-systemd-notify)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-'--ready[Inform the init system about service start-up 
completion.]' \
-'--pid=[Inform the init system about the main PID of the 
daemon]' \
-'--status=[Send a free-form status string for the daemon to 
the init systemd]' \
-'--booted[Returns 0 if the system was booted up with systemd]' 
\
-'--readahead=[Controls disk read-ahead 
operations]:arguments:(cancel done noreply)'
-;;
-systemd-tty-ask-password-agent)
-_arguments \
-{-h,--help}'[Prints a short help text and exits.]' \
-'--version[Prints a short version string and exits.]' \
-'--list[Lists all currently pending system password 
requests.]' \
-'--query[Process all currently pending system password 
requests by querying the user on the calling TTY.]' \
-'--watch[Continuously process password requests.]' \
-'--wall[Forward password requests to wall(1).]' \
-'--plymouth[Ask question with plymouth(8).]' \
-'--console[Ask question on /dev/console.]'
-;;
-*) _message 'eh?' ;;
-esac
-}
-
-_ctls $@
+local curcontext=$curcontext state lstate line
+case $service in
+systemd-ask-password)
+_arguments \
+{-h,--help}'[Show this help]' \
+'--icon=[Icon name]' \
+'--timeout=[Timeout in sec]' \
+'--no-tty[Ask question via agent even on TTY]' \
+'--accept-cached[Accept cached passwords]' \
+'--multiple[List multiple passwords if available]'
+;;
+  

[systemd-devel] [PATCH 2/3 v2] zsh_completion: machinectl properties can be stacked

2013-08-14 Thread William Giokas
---
 shell-completion/zsh/_machinectl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl
index aa568e5..abdf46f 100644
--- a/shell-completion/zsh/_machinectl
+++ b/shell-completion/zsh/_machinectl
@@ -35,7 +35,7 @@
 _arguments \
   {-h,--help}'[Prints a short help text and exits.]' \
   '--version[Prints a short version string and exits.]' \
-  {-p,--property=}'[Limit output to specified property.]:property:(Name Id 
Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
+  \*{-p,--property=}'[Limit output to specified property.]:property:(Name Id 
Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
   {-a,--all}'[Show all proerties]' \
   (-l,--full)'[Do not ellipsize cgroup members]' \
   '--no-pager[Do not pipe output into a pager]' \
-- 
1.8.4.rc3.498.g5af1768

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 0/3] Z-Shell fixes

2013-08-14 Thread William Giokas
Just a redo of the three un-merged patches on the ml at the moment. Nothing
really different, just rebased.

William Giokas (3):
  zsh_completion: Allow specifying multiple arguments -- Just rebased.
  zsh_completion: machinectl properties can be stacked
  zsh_completion: Remove ctls function from _systemd

 Makefile.am   |   1 +
 shell-completion/zsh/_machinectl  |   2 +-
 shell-completion/zsh/_systemctl   |  16 +++-
 shell-completion/zsh/_systemd | 174 --
 shell-completion/zsh/_systemd-delta   |  15 +++
 shell-completion/zsh/_systemd-inhibit |   8 +-
 6 files changed, 118 insertions(+), 98 deletions(-)
 create mode 100644 shell-completion/zsh/_systemd-delta

-- 
1.8.4.rc3.498.g5af1768

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 1/2] zsh_completion: Allow specifying multiple arguments

2013-08-13 Thread William Giokas
Some of the options in systemd can take multiple arguments, such as
systemctl's --type option. Previously, you would only be able to
complete a single type after the -t, but now zsh will continue to
complete the types, separating them by commas.

systemd-inhibit's --what command has colon (:), and that has been taken
into account.
---
 Makefile.am   |  1 +
 shell-completion/zsh/_systemctl   | 16 ++--
 shell-completion/zsh/_systemd | 11 +--
 shell-completion/zsh/_systemd-delta   | 15 +++
 shell-completion/zsh/_systemd-inhibit |  8 +++-
 5 files changed, 38 insertions(+), 13 deletions(-)
 create mode 100644 shell-completion/zsh/_systemd-delta

diff --git a/Makefile.am b/Makefile.am
index 0590e4d..8d9c0fb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -351,6 +351,7 @@ dist_zshcompletion_DATA = \
shell-completion/zsh/_systemd-nspawn \
shell-completion/zsh/_systemd-analyze \
shell-completion/zsh/_sd_hosts_or_user_at_host \
+   shell-completion/zsh/_systemd-delta \
shell-completion/zsh/_systemd
 
 dist_sysctl_DATA = \
diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl
index f8b191f..cc2df3c 100644
--- a/shell-completion/zsh/_systemctl
+++ b/shell-completion/zsh/_systemctl
@@ -294,11 +294,23 @@ _outputmodes() {
 _describe -t output 'output mode' _output_opts || compadd $@
 }
 
+_unit_states() {
+local -a _states
+_states=(loaded failed active inactive not-found listening running waiting 
plugged mounted exited dead masked)
+_values -s , ${_states[@]}
+}
+
+_unit_types() {
+local -a _types
+_types=(automount device mount path service snapshot socket swap target 
timer)
+_values -s , ${_types[@]}
+}
+
 _arguments -s \
 {-h,--help}'[Show help]' \
 '--version[Show package version]' \
-{-t,--type=}'[List only units of a particular type]:unit type:(automount 
device mount path service snapshot socket swap target timer)' \
-'--state=[Display units in the specifyied state]:unit state:(loaded failed 
active inactive not-found listening running waiting plugged mounted exited dead 
masked)' \
+{-t,--type=}'[List only units of a particular type]:unit type:_unit_types' 
\
+'--state=[Display units in the specifyied state]:unit state:_unit_states' \
 \*{-p,--property=}'[Show only properties by specific name]:unit property' \
 {-a,--all}'[Show all units/properties, including dead/empty ones]' \
 '--reverse[Show reverse dependencies]' \
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 7aab52d..fe39de8 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,4 +1,4 @@
-#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-delta systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tty-ask-password-agent
+#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tty-ask-password-agent
 
 _ctls()
 {
@@ -45,15 +45,6 @@ _ctls()
 {-b,--batch}'[Run in batch mode, accepting no input]' \
 '--depth=[Maximum traversal depth]'
 ;;
-systemd-delta)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-'--no-pager[Do not pipe output into a pager]' \
-'--diff=[Show a diff when overridden files differ]:boolean:(1 
0)' \
-{-t,--type=}'[Only display a selected set of override 
types]:types:(masked equivalent redirected overridden unchanged)' \
-':SUFFIX:(tmpfiles.d sysctl.d systemd/system)'
-;;
 systemd-detect-virt)
 _arguments \
 {-h,--help}'[Show this help]' \
diff --git a/shell-completion/zsh/_systemd-delta 
b/shell-completion/zsh/_systemd-delta
new file mode 100644
index 000..6abb6fc
--- /dev/null
+++ b/shell-completion/zsh/_systemd-delta
@@ -0,0 +1,15 @@
+#compdef systemd-delta
+
+_delta_type() {
+local -a _delta_types
+_delta_types=(masked equivalent redirected overridden unchanged)
+_values -s , ${_delta_types[@]}
+}
+
+_arguments \
+{-h,--help}'[Show this help]' \
+'--version[Show package version]' \
+'--no-pager[Do not pipe output into a pager]' \
+'--diff=[Show a diff when overridden files differ]:boolean:(1 0)' \
+{-t,--type=}'[Only display a selected set of override 
types]:types:_delta_type' \
+':SUFFIX:(tmpfiles.d sysctl.d systemd/system)'
diff --git a/shell-completion/zsh/_systemd-inhibit 
b/shell-completion/zsh/_systemd-inhibit
index 7953455..1ecb6dc 100644
--- a/shell-completion/zsh/_systemd-inhibit
+++ b/shell-completion/zsh/_systemd-inhibit
@@ -16,10 +16,16 @@ _systemd_inhibit_command(){
 fi
 }
 
+_inhibit_what() {
+local _inhibit
+_inhibit=(shutdown sleep idle handle-power-key 

[systemd-devel] [PATCH 2/2] zsh_completion: machinectl properties can be stacked

2013-08-13 Thread William Giokas
---
 shell-completion/zsh/_machinectl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl
index aa568e5..abdf46f 100644
--- a/shell-completion/zsh/_machinectl
+++ b/shell-completion/zsh/_machinectl
@@ -35,7 +35,7 @@
 _arguments \
   {-h,--help}'[Prints a short help text and exits.]' \
   '--version[Prints a short version string and exits.]' \
-  {-p,--property=}'[Limit output to specified property.]:property:(Name Id 
Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
+  \*{-p,--property=}'[Limit output to specified property.]:property:(Name Id 
Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
   {-a,--all}'[Show all proerties]' \
   (-l,--full)'[Do not ellipsize cgroup members]' \
   '--no-pager[Do not pipe output into a pager]' \
-- 
1.8.4.rc2.458.gc9b7461

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] zsh_completion: Remove function from _systemd

2013-08-13 Thread William Giokas
---
 shell-completion/zsh/_systemd | 163 --
 1 file changed, 79 insertions(+), 84 deletions(-)

diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index fe39de8..e954c3e 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,88 +1,83 @@
 #compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tty-ask-password-agent
 
-_ctls()
-{
-local curcontext=$curcontext state lstate line
-case $service in
-systemd-ask-password)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--icon=[Icon name]' \
-'--timeout=[Timeout in sec]' \
-'--no-tty[Ask question via agent even on TTY]' \
-'--accept-cached[Accept cached passwords]' \
-'--multiple[List multiple passwords if available]'
-;;
-systemd-cat)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version.]' \
-{-t,--identifier=}'[Set syslog identifier.]' \
-{-p,--priority=}'[Set priority value.]:value:({0..7})' \
-'--level-prefix=[Control whether level prefix shall be 
parsed.]:boolean:(1 0)' \
-':Message'
-;;
-systemd-cgls)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-'--no-pager[Do not pipe output into a pager]' \
-{-a,--all}'[Show all groups, including empty]' \
-'-k[Include kernel threads in output]' \
-':cgroups:(cpuset cpu cpuacct memory devices freezer net_cls 
blkio)'
-;;
-systemd-cgtop)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Print version and exit]' \
-'(-c -m -i -t)-p[Order by path]' \
-'(-c -p -m -i)-t[Order by number of tasks]' \
-'(-m -p -i -t)-c[Order by CPU load]' \
-'(-c -p -i -t)-m[Order by memory load]' \
-'(-c -m -p -t)-i[Order by IO load]' \
-{-d,--delay=}'[Specify delay]' \
-{-n,--iterations=}'[Run for N iterations before exiting]' \
-{-b,--batch}'[Run in batch mode, accepting no input]' \
-'--depth=[Maximum traversal depth]'
-;;
-systemd-detect-virt)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-{-c,--container}'[Only detect whether we are run in a 
container]' \
-{-v,--vm}'[Only detect whether we are run in a VM]' \
-{-q,--quiet}[Don't output anything, just set return value]
-;;
-systemd-machine-id-setup)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]'
-;;
-systemd-notify)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-'--ready[Inform the init system about service start-up 
completion.]' \
-'--pid=[Inform the init system about the main PID of the 
daemon]' \
-'--status=[Send a free-form status string for the daemon to 
the init systemd]' \
-'--booted[Returns 0 if the system was booted up with systemd]' 
\
-'--readahead=[Controls disk read-ahead 
operations]:arguments:(cancel done noreply)'
-;;
-systemd-tty-ask-password-agent)
-_arguments \
-{-h,--help}'[Prints a short help text and exits.]' \
-'--version[Prints a short version string and exits.]' \
-'--list[Lists all currently pending system password 
requests.]' \
-'--query[Process all currently pending system password 
requests by querying the user on the calling TTY.]' \
-'--watch[Continuously process password requests.]' \
-'--wall[Forward password requests to wall(1).]' \
-'--plymouth[Ask question with plymouth(8).]' \
-'--console[Ask question on /dev/console.]'
-;;
-*) _message 'eh?' ;;
-esac
-}
-
-_ctls $@
+local curcontext=$curcontext state lstate line
+case $service in
+systemd-ask-password)
+_arguments \
+{-h,--help}'[Show this help]' \
+'--icon=[Icon name]' \
+'--timeout=[Timeout in sec]' \
+'--no-tty[Ask question via agent even on TTY]' \
+'--accept-cached[Accept cached passwords]' \
+'--multiple[List multiple passwords if available]'
+;;
+systemd-cat)
+_arguments \
+

[systemd-devel] [PATCH] zsh_completion: Correctly display journal fields

2013-08-12 Thread William Giokas
---
 shell-completion/zsh/_journalctl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 61983d5..32708f5 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -19,7 +19,7 @@ _list_fields() {
 _KERNEL_{DEVICE,SUBSYSTEM}
 _UDEV_{SYSNAME,DEVNODE,DEVLINK}
 __CURSOR __{REALTIME,MONOTONIC}_TIMESTAMP)
-_describe 'possible fields' journal_fields
+_values -s '=' 'possible fields' ${journal_fields[@]}:value:
 }
 
 _journal_none() {
-- 
1.8.4.rc2.458.gc9b7461

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH v2] zsh_completion: Correctly display journal fields

2013-08-12 Thread William Giokas
---

Just a slightly edited version that functions MUCH nicer. Now, on top of
putting in the equals sign, when you type in:

  journalctl _EXE=tab

it automagically calles _journal_fields with _EXE as an argument. Same
with every other value you could put in there. Some examples:

wgiokas@wst420:~ % journalctl _BOOT_ID=tab
 possible values
037a3189b60e4da3917b49f7b92fe1ae  75fc1f7abd0c46d98c8dc159d69ae33c
wgiokas@wst420:~ % journalctl _HOSTNAME=tab
 possible values
bridge1localhost  wst420 wst421


 shell-completion/zsh/_journalctl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 61983d5..0e909fe 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -19,7 +19,8 @@ _list_fields() {
 _KERNEL_{DEVICE,SUBSYSTEM}
 _UDEV_{SYSNAME,DEVNODE,DEVLINK}
 __CURSOR __{REALTIME,MONOTONIC}_TIMESTAMP)
-_describe 'possible fields' journal_fields
+_values -s '=' 'possible fields' \
+  ${journal_fields[@]}:value:_journal_fields ${words[CURRENT]%%=*}
 }
 
 _journal_none() {
-- 
1.8.4.rc2.458.gc9b7461

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] zsh_completion: Move helper function to autoload

2013-08-12 Thread William Giokas
_hosts_or_user_at_host was used by 6 different completions, and
previously was in all 6 of those files. I moved it out to its own file,
_sd_hosts_or_user_at_host. This will be autoloaded for use in other
completion functions. It also allows external completions to use this
function by simply calling _sd_hosts_or_user_at_host as in the systemd
completions.
---

I noticed this when looking at the _machinectl completions and seeing no
function of that name in the file. I think that this will make things
easier in the future.

The '_sd_' is just to prevent name conflicts if some other program
provides _hosts_or_user_at_host.

 Makefile.am| 1 +
 shell-completion/zsh/_hostnamectl  | 8 +---
 shell-completion/zsh/_localectl| 8 +---
 shell-completion/zsh/_loginctl | 8 +---
 shell-completion/zsh/_machinectl   | 2 +-
 shell-completion/zsh/_sd_hosts_or_user_at_host | 5 +
 shell-completion/zsh/_systemctl| 8 +---
 shell-completion/zsh/_timedatectl  | 8 +---
 8 files changed, 12 insertions(+), 36 deletions(-)
 create mode 100644 shell-completion/zsh/_sd_hosts_or_user_at_host

diff --git a/Makefile.am b/Makefile.am
index b8b8d06..0590e4d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -350,6 +350,7 @@ dist_zshcompletion_DATA = \
shell-completion/zsh/_kernel-install \
shell-completion/zsh/_systemd-nspawn \
shell-completion/zsh/_systemd-analyze \
+   shell-completion/zsh/_sd_hosts_or_user_at_host \
shell-completion/zsh/_systemd
 
 dist_sysctl_DATA = \
diff --git a/shell-completion/zsh/_hostnamectl 
b/shell-completion/zsh/_hostnamectl
index bc4441d..9d01495 100644
--- a/shell-completion/zsh/_hostnamectl
+++ b/shell-completion/zsh/_hostnamectl
@@ -1,11 +1,5 @@
 #compdef hostnamectl
 
-_hosts_or_user_at_host() {
-  _alternative \
-'users-hosts:: _user_at_host' \
-'hosts:: _hosts'
-}
-
 _hostnamectl_command() {
 local -a _hostnamectl_cmds
 _hostnamectl_cmds=(
@@ -34,5 +28,5 @@ _arguments -s \
 '--static[Only set static hostname]' \
 '--pretty[Only set pretty hostname]' \
 '--no-ask-password[Do not prompt for password]' \
-{-H,--host=}'[Operate on remote host]:userathost:_hosts_or_user_at_host' \
+{-H,--host=}'[Operate on remote 
host]:userathost:_sd_hosts_or_user_at_host' \
 '*::hostnamectl commands:_hostnamectl_command'
diff --git a/shell-completion/zsh/_localectl b/shell-completion/zsh/_localectl
index 0beed4f..321e418 100644
--- a/shell-completion/zsh/_localectl
+++ b/shell-completion/zsh/_localectl
@@ -73,17 +73,11 @@ _localectl_command() {
 fi
 }
 
-_hosts_or_user_at_host() {
-  _alternative \
-'users-hosts:: _user_at_host' \
-'hosts:: _hosts'
-}
-
 _arguments \
 {-h,--help}'[Show this help]' \
 '--version[Show package version]' \
 --no-convert[Don't convert keyboard mappings] \
 '--no-pager[Do not pipe output into a pager]' \
 '--no-ask-password[Do not prompt for password]' \
-{-H,--host=}'[Operate on remote host]:userathost:_hosts_or_user_at_host' \
+{-H,--host=}'[Operate on remote 
host]:userathost:_sd_hosts_or_user_at_host' \
 '*::localectl commands:_localectl_command'
diff --git a/shell-completion/zsh/_loginctl b/shell-completion/zsh/_loginctl
index d121a25..6d88685 100644
--- a/shell-completion/zsh/_loginctl
+++ b/shell-completion/zsh/_loginctl
@@ -1,11 +1,5 @@
 #compdef loginctl
 
-_hosts_or_user_at_host() {
-  _alternative \
-'users-hosts:: _user_at_host' \
-'hosts:: _hosts'
-}
-
 _loginctl_all_sessions(){_sys_all_sessions=($(loginctl list-sessions | { while 
read a b; do echo  $a; done; }) )}
 _loginctl_all_users()   {_sys_all_users=(   $(loginctl list-users| { while 
read a b; do echo  $a; done; }) )}
 _loginctl_all_seats()   {_sys_all_seats=(   $(loginctl list-seats| { while 
read a b; do echo  $a; done; }) )}
@@ -106,7 +100,7 @@ _arguments -s \
 '--kill-who=[Who to send signal to]:killwho:(main control all)' \
 {-s,--signal=}'[Which signal to send]:signal:_signals' \
 '--no-ask-password[Do not ask for system passwords]' \
-{-H,--host=}'[Show information for remote 
host]:userathost:_hosts_or_user_at_host' \
+{-H,--host=}'[Show information for remote 
host]:userathost:_sd_hosts_or_user_at_host' \
 {-P,--privileged}'[Acquire privileges before execution]' \
 '--no-pager[Do not pipe output into a pager]' \
 '*::loginctl command:_loginctl_command'
diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl
index 89196a5..aa568e5 100644
--- a/shell-completion/zsh/_machinectl
+++ b/shell-completion/zsh/_machinectl
@@ -42,6 +42,6 @@ _arguments \
   '--no-ask-password[Do not ask for system passwords]' \
   '--kill-who=[Who to send signal to]:killwho:(leader all)' \
   {-s,--signal=}'[Which signal to send]:signal:_signals' \
-  {-H,--host=}'[Show information for remote 

[systemd-devel] [PATCH 18/18] shell-comp: Fix up unit completing for _journalctl

2013-08-01 Thread William Giokas
-u and --user-unit can be specified multiple times, so put a * in front
of it, and --user-unit can have an =, and should be looking for the
USER_UNIT not _SYSTEMD_USER_UNIT.
---
 shell-completion/zsh/_journalctl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 61983d5..76cb594 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -66,8 +66,8 @@ _arguments -s \
 {-m,--merge}'[Show entries from all available journals]' \
 {-b,--boot=}'[Show data only from the specified boot or offset]:boot id or 
offset:_journal_boots' \
 {-k,--dmesg}'[Show only kernel messages, Implies -b]' \
-{-u,--unit=}'[Show data only from the specified 
unit]:units:_journal_fields _SYSTEMD_UNIT' \
-'--user-unit[Show data only from the specified user session 
unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \
+\*{-u,--unit=}'[Show data only from the specified 
unit]:units:_journal_fields _SYSTEMD_UNIT' \
+'*--user-unit=[Show data only from the specified user session 
unit]:units:_journal_fields USER_UNIT' \
 {-p,--priority=}'[Show only messages within the specified priority 
range]:priority:_journal_fields PRIORITY' \
 {-c,--cursor=}'[Start showing entries from specified 
cursor]:cursors:_journal_fields __CURSORS' \
 '--after-cursor=[Start showing entries from the location in the journal 
after the cursor]:cursors:_journal_fields __CURSORS' \
-- 
1.8.4.rc0.352.g531e8cb

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 10/16 v2] shell-comp: Split out zsh _systemd-nspawn

2013-07-31 Thread William Giokas
Also fix the random lack of completion
---

I think that it has something to do with the function being called the same
thing as the command. I don't know, but renaming it to something that is
actually more descriptive makes it work.

 Makefile.am  |  1 +
 shell-completion/zsh/_systemd| 26 +-
 shell-completion/zsh/_systemd-nspawn | 24 
 3 files changed, 26 insertions(+), 25 deletions(-)
 create mode 100644 shell-completion/zsh/_systemd-nspawn

diff --git a/Makefile.am b/Makefile.am
index c96c8b1..24e4fa4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -347,6 +347,7 @@ dist_zshcompletion_DATA = \
shell-completion/zsh/_systemctl \
shell-completion/zsh/_journalctl \
shell-completion/zsh/_udevadm \
+   shell-completion/zsh/_systemd-nspawn \
shell-completion/zsh/_systemd
 
 dist_sysctl_DATA = \
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 78cb061..bacf179 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,4 +1,4 @@
-#compdef systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
+#compdef systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
 
 _ctls()
 {
@@ -96,20 +96,6 @@ _ctls()
 '--booted[Returns 0 if the system was booted up with systemd]' 
\
 '--readahead=[Controls disk read-ahead 
operations]:arguments:(cancel done noreply)'
 ;;
-systemd-nspawn)
-_arguments \
-{-h,--help}'[Show this help]' \
-{--directory=,-D}'[Directory to use as file system root for 
the namespace container. If omitted the current directory will be 
used.]:directories:_directories' \
-{--boot,-b}'[Automatically search for an init binary and 
invoke it instead of a shell or a user supplied program.]' \
-{--user=,-u}'[Run the command under specified user, create 
home directory and cd into it.]' \
-'--uuid=[Set the specified uuid for the container.]' \
-{--controllers=,-C}'[Makes the container appear in other 
hierarchies than the name=systemd:/ one. Takes a comma-separated list of 
controllers.]' \
-'--private-network[Turn off networking in the container. This 
makes all network interfaces unavailable in the container, with the exception 
of the loopback device.]' \
-'--read-only[Mount the root file system read only for the 
container.]' \
-'--capability=[List one or more additional capabilities to 
grant the container.]:capabilities:_systemd-nspawn' \
---link-journal=[Control whether the container's journal shall 
be made visible to the host system.]:options:(no, host, guest, auto) \
-'-j[Equivalent to --link-journal=guest.]'
-;;
 systemd-tmpfiles)
 _arguments \
 '--create[Create, set ownership/permissions based on the 
config files.]' \
@@ -150,16 +136,6 @@ _ctls()
 esac
 }
 
-_systemd-nspawn(){
-local -a _caps
-_caps=( CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH
-CAP_FOWNER CAP_FSETID CAP_IPC_OWNER CAP_KILL CAP_LEASE 
CAP_LINUX_IMMUTABLE
-CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETGID 
CAP_SETFCAP CAP_SETPCAP
-CAP_SETUID CAP_SYS_ADMIN CAP_SYS_CHROOT CAP_SYS_NICE 
CAP_SYS_PTRACE CAP_SYS_TTY_CONFIG
-CAP_SYS_RESOURCE CAP_SYS_BOOT )
-_values -s , 'capabilities' $_caps[@]
-}
-
 _systemd_inhibit_command(){
 if (( CURRENT == 1 )); then
 compset -q
diff --git a/shell-completion/zsh/_systemd-nspawn 
b/shell-completion/zsh/_systemd-nspawn
new file mode 100644
index 000..a5f345e
--- /dev/null
+++ b/shell-completion/zsh/_systemd-nspawn
@@ -0,0 +1,24 @@
+#compdef systemd-nspawn
+
+_nspawn-caps(){
+local -a _caps
+_caps=( CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH
+CAP_FOWNER CAP_FSETID CAP_IPC_OWNER CAP_KILL CAP_LEASE 
CAP_LINUX_IMMUTABLE
+CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETGID 
CAP_SETFCAP CAP_SETPCAP
+CAP_SETUID CAP_SYS_ADMIN CAP_SYS_CHROOT CAP_SYS_NICE 
CAP_SYS_PTRACE CAP_SYS_TTY_CONFIG
+CAP_SYS_RESOURCE CAP_SYS_BOOT )
+_values -s , 'capabilities' $_caps[@]
+}
+
+_arguments \
+{-h,--help}'[Show this help]' \
+{--directory=,-D}'[Directory to use as file system root for the namespace 
container. If omitted the current directory will be 
used.]:directories:_directories' \
+{--boot,-b}'[Automatically search for an init binary and invoke it 

[systemd-devel] [GIT PULL v3] Split out zsh completion into multiple files

2013-07-30 Thread William Giokas
On Mon, Jul 29, 2013 at 05:10:34PM -0500, William Giokas wrote:
 On Tue, Jul 30, 2013 at 12:05:00AM +0200, Michael Biebl wrote:
  One of the main reasons why the bash completion was split into
  separate files named after the individual binary, is that
  bash-completion will load the completions on demand this way.
  
  What's the benefit of splitting the zsh completion?
 
 The bash completion was also split so that not all of the completions
 were installed if they weren't needed. If you configure systemd without
 xyz binary, the _xyz completion will not install, for the most part.

Completing even more of the split for all of the ./configure-able parts
of systemd, _systemd-tmpfiles is now only installed if the binary
systemd-tmpfiles is as well.

You can review the changes in cgit here:

  http://git.kaictl.net/wgiokas/systemd.git/?h=zshcomp3



The following changes since commit b5b7ea750388919eee6087eb63f08903b57447cf:

  bash-completion: simplify udevadm completion (2013-07-30 13:04:46 -0400)

are available in the git repository at:

  git://git.kaictl.net/pub/wgiokas/systemd.git zshcomp3

for you to fetch changes up to 2024edb417201f7b3b2adcfd12de5e4680dd2e09:

  shell-comp: Split out zsh _systemd-tmpfiles (2013-07-30 19:12:35 -0500)


William Giokas (16):
  shell-completion: fix zsh completion installation
  shell-comp: Split out zsh _systemctl
  shell-comp: Split out zsh _loginctl
  shell-comp: Split out zsh _hostnamectl
  shell-comp: Split out zsh _journalctl
  shell-comp: Split out zsh _localectl
  shell-comp: Split out zsh _coredumpctl
  shell-comp: Split out zsh _timedatectl
  shell-comp: Split out zsh _udevadm
  shell-comp: Split out zsh _systemd-nspawn
  shell-comp: Split out zsh _systemd-inhibit
  shell-comp: Split out zsh _systemd-analyze
  shell-comp: Split out zsh _machinectl
  shell-comp: Remove unused functions
  shell-comp: Fix journalctl's --boot
  shell-comp: Split out zsh _systemd-tmpfiles

 Makefile.am |   35 +-
 configure.ac|6 +
 shell-completion/systemd-zsh-completion.zsh | 1102 ---
 shell-completion/zsh/_hostnamectl   |   38 +
 shell-completion/zsh/_journalctl|   92 +++
 shell-completion/zsh/_localectl |   89 +++
 shell-completion/zsh/_loginctl  |  112 +++
 shell-completion/zsh/_machinectl|   47 ++
 shell-completion/zsh/_systemctl |  340 +
 shell-completion/zsh/_systemd   |   97 +++
 shell-completion/zsh/_systemd-analyze   |   26 +
 shell-completion/zsh/_systemd-coredumpctl   |   34 +
 shell-completion/zsh/_systemd-inhibit   |   27 +
 shell-completion/zsh/_systemd-nspawn|   24 +
 shell-completion/zsh/_systemd-tmpfiles  |   10 +
 shell-completion/zsh/_timedatectl   |   71 ++
 shell-completion/zsh/_udevadm   |  141 
 17 files changed, 1186 insertions(+), 1105 deletions(-)
 delete mode 100644 shell-completion/systemd-zsh-completion.zsh
 create mode 100644 shell-completion/zsh/_hostnamectl
 create mode 100644 shell-completion/zsh/_journalctl
 create mode 100644 shell-completion/zsh/_localectl
 create mode 100644 shell-completion/zsh/_loginctl
 create mode 100644 shell-completion/zsh/_machinectl
 create mode 100644 shell-completion/zsh/_systemctl
 create mode 100644 shell-completion/zsh/_systemd
 create mode 100644 shell-completion/zsh/_systemd-analyze
 create mode 100644 shell-completion/zsh/_systemd-coredumpctl
 create mode 100644 shell-completion/zsh/_systemd-inhibit
 create mode 100644 shell-completion/zsh/_systemd-nspawn
 create mode 100644 shell-completion/zsh/_systemd-tmpfiles
 create mode 100644 shell-completion/zsh/_timedatectl
 create mode 100644 shell-completion/zsh/_udevadm

-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpT9Z5k4mAOT.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 11/16] shell-comp: Split out zsh _systemd-inhibit

2013-07-30 Thread William Giokas
---
 Makefile.am   |  3 ++-
 shell-completion/zsh/_systemd | 30 +-
 shell-completion/zsh/_systemd-inhibit | 27 +++
 3 files changed, 30 insertions(+), 30 deletions(-)
 create mode 100644 shell-completion/zsh/_systemd-inhibit

diff --git a/Makefile.am b/Makefile.am
index 24e4fa4..a4443fb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3730,7 +3730,8 @@ dist_bashcompletion_DATA += \
shell-completion/bash/loginctl
 
 dist_zshcompletion_DATA += \
-   shell-completion/zsh/_loginctl
+   shell-completion/zsh/_loginctl \
+   shell-completion/zsh/_systemd-inhibit
 
 systemd_inhibit_SOURCES = \
src/login/inhibit.c
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index bacf179..6908725 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,4 +1,4 @@
-#compdef systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
+#compdef systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-machine-id-setup 
systemd-notify systemd-tmpfiles systemd-tty-ask-password-agent machinectl
 
 _ctls()
 {
@@ -70,17 +70,6 @@ _ctls()
 {-v,--vm}'[Only detect whether we are run in a VM]' \
 {-q,--quiet}[Don't output anything, just set return value]
 ;;
-systemd-inhibit)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-'--what=[Operations to inhibit]:options:(shutdown sleep idle 
handle-power-key handle-suspend-key handle-hibernate-key handle-lid-switch)' \
-'--who=[A descriptive string who is inhibiting]' \
-'--why=[A descriptive string why is being inhibited]' \
-'--mode=[One of block or delay]' \
-'--list[List active inhibitors]' \
-'*:commands:_systemd_inhibit_command'
-;;
 systemd-machine-id-setup)
 _arguments \
 {-h,--help}'[Show this help]' \
@@ -136,23 +125,6 @@ _ctls()
 esac
 }
 
-_systemd_inhibit_command(){
-if (( CURRENT == 1 )); then
-compset -q
-_normal
-else
-local n=${words[(b:2:i)[^-]*]}
-if (( n = CURRENT )); then
-compset -n $n
-_alternative \
-'files:file:_files' \
-'commands:command:_normal'  return 0
-fi
-_default
-fi
-
-}
-
 _systemd_analyze_command(){
 local -a _systemd_analyze_cmds
 # Descriptions taken from systemd-analyze --help.
diff --git a/shell-completion/zsh/_systemd-inhibit 
b/shell-completion/zsh/_systemd-inhibit
new file mode 100644
index 000..7953455
--- /dev/null
+++ b/shell-completion/zsh/_systemd-inhibit
@@ -0,0 +1,27 @@
+#compdef systemd-inhibit
+
+_systemd_inhibit_command(){
+if (( CURRENT == 1 )); then
+compset -q
+_normal
+else
+local n=${words[(b:2:i)[^-]*]}
+if (( n = CURRENT )); then
+compset -n $n
+_alternative \
+'files:file:_files' \
+'commands:command:_normal'  return 0
+fi
+_default
+fi
+}
+
+_arguments \
+{-h,--help}'[Show this help]' \
+'--version[Show package version]' \
+'--what=[Operations to inhibit]:options:(shutdown sleep idle 
handle-power-key handle-suspend-key handle-hibernate-key handle-lid-switch)' \
+'--who=[A descriptive string who is inhibiting]' \
+'--why=[A descriptive string why is being inhibited]' \
+'--mode=[One of block or delay]' \
+'--list[List active inhibitors]' \
+'*:commands:_systemd_inhibit_command'
-- 
1.8.4.rc0.352.g531e8cb

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 12/16] shell-comp: Split out zsh _systemd-analyze

2013-07-30 Thread William Giokas
---
 Makefile.am   |  1 +
 shell-completion/zsh/_systemd | 28 +---
 shell-completion/zsh/_systemd-analyze | 26 ++
 3 files changed, 28 insertions(+), 27 deletions(-)
 create mode 100644 shell-completion/zsh/_systemd-analyze

diff --git a/Makefile.am b/Makefile.am
index a4443fb..4ac09cf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -348,6 +348,7 @@ dist_zshcompletion_DATA = \
shell-completion/zsh/_journalctl \
shell-completion/zsh/_udevadm \
shell-completion/zsh/_systemd-nspawn \
+   shell-completion/zsh/_systemd-analyze \
shell-completion/zsh/_systemd
 
 dist_sysctl_DATA = \
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 6908725..d0e1f3d 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,17 +1,9 @@
-#compdef systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-machine-id-setup 
systemd-notify systemd-tmpfiles systemd-tty-ask-password-agent machinectl
+#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-delta systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tmpfiles systemd-tty-ask-password-agent machinectl
 
 _ctls()
 {
 local curcontext=$curcontext state lstate line
 case $service in
-systemd-analyze)
-_arguments \
-{-h,--help}'[Show help text.]' \
-'--user[Shows performance data of user sessions instead of the 
system manager.]' \
-'--order[When generating graph for dot, show only order]' \
-'--require[When generating graph for dot, show only 
requirement]' \
-'*::systemd-analyze commands:_systemd_analyze_command'
-;;
 systemd-ask-password)
 _arguments \
 {-h,--help}'[Show this help]' \
@@ -125,24 +117,6 @@ _ctls()
 esac
 }
 
-_systemd_analyze_command(){
-local -a _systemd_analyze_cmds
-# Descriptions taken from systemd-analyze --help.
-_systemd_analyze_cmds=(
-'time:Print time spent in the kernel before reaching userspace'
-'blame:Print list of running units ordered by time to init'
-'critical-chain:Print a tree of the time critical chain of units'
-'plot:Output SVG graphic showing service initialization'
-'dot:Dump dependency graph (in dot(1) format)'
-)
-
-if (( CURRENT == 1 )); then
-_describe options _systemd_analyze_cmds
-else
-_message no more options
-fi
-}
-
 _hosts_or_user_at_host()
 {
   _alternative \
diff --git a/shell-completion/zsh/_systemd-analyze 
b/shell-completion/zsh/_systemd-analyze
new file mode 100644
index 000..13e96c0
--- /dev/null
+++ b/shell-completion/zsh/_systemd-analyze
@@ -0,0 +1,26 @@
+#compdef systemd-analyze
+
+_systemd_analyze_command(){
+local -a _systemd_analyze_cmds
+# Descriptions taken from systemd-analyze --help.
+_systemd_analyze_cmds=(
+'time:Print time spent in the kernel before reaching userspace'
+'blame:Print list of running units ordered by time to init'
+'critical-chain:Print a tree of the time critical chain of units'
+'plot:Output SVG graphic showing service initialization'
+'dot:Dump dependency graph (in dot(1) format)'
+)
+
+if (( CURRENT == 1 )); then
+_describe options _systemd_analyze_cmds
+else
+_message no more options
+fi
+}
+
+_arguments \
+{-h,--help}'[Show help text.]' \
+'--user[Shows performance data of user sessions instead of the system 
manager.]' \
+'--order[When generating graph for dot, show only order]' \
+'--require[When generating graph for dot, show only requirement]' \
+'*::systemd-analyze commands:_systemd_analyze_command'
-- 
1.8.4.rc0.352.g531e8cb

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 14/16] shell-comp: Remove unused functions

2013-07-30 Thread William Giokas
---
 shell-completion/zsh/_systemd | 13 -
 1 file changed, 13 deletions(-)

diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 8eced09..1addfa5 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -102,19 +102,6 @@ _ctls()
 esac
 }
 
-_hosts_or_user_at_host()
-{
-  _alternative \
-'users-hosts:: _user_at_host' \
-'hosts:: _hosts'
-}
-
-_outputmodes() {
-local -a _output_opts
-_output_opts=(short short-monotonic verbose export json json-pretty 
json-see cat)
-_describe -t output 'output mode' _output_opts || compadd $@
-}
-
 _ctls $@
 
 #vim: set ft=zsh sw=4 ts=4 et
-- 
1.8.4.rc0.352.g531e8cb

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 13/16] shell-comp: Split out zsh _machinectl

2013-07-30 Thread William Giokas
---
 Makefile.am  |  3 +++
 shell-completion/zsh/_machinectl | 47 ++
 shell-completion/zsh/_systemd| 49 +---
 3 files changed, 51 insertions(+), 48 deletions(-)
 create mode 100644 shell-completion/zsh/_machinectl

diff --git a/Makefile.am b/Makefile.am
index 4ac09cf..3713d0d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3632,6 +3632,9 @@ dist_dbussystemservice_DATA += \
 dist_dbuspolicy_DATA += \
src/machine/org.freedesktop.machine1.conf
 
+dist_zshcompletion_DATA += \
+   shell-completion/zsh/_machinectl
+
 SYSTEM_UNIT_ALIASES += \
systemd-machined.service dbus-org.freedesktop.machine1.service
 
diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl
new file mode 100644
index 000..89196a5
--- /dev/null
+++ b/shell-completion/zsh/_machinectl
@@ -0,0 +1,47 @@
+#compdef machinectl
+
+(( $+functions[_machinectl_command] )) || _machinectl_command()
+{
+  local -a _machinectl_cmds
+  _machinectl_cmds=(
+list:List currently running VMs/containers
+status:Show VM/container status
+show:Show properties of one or more VMs/containers
+terminate:Terminate one or more VMs/containers
+kill:Send signal to process or a VM/container
+  )
+  if (( CURRENT == 1 )); then
+_describe -t commands 'machinectl command' _machinectl_cmds || compadd $@
+  else
+local curcontext=$curcontext
+cmd=${${_machinectl_cmds[(r)$words[1]:*]%%:*}}
+if (( $#cmd )); then
+  case $cmd in
+list) msg=no options ;;
+*)
+  _machines=( ${(foa)$(machinectl list | awk '{print $1}')} )
+  if [[ -n $_machines ]]; then
+_describe 'machines' _machines
+  else
+_message 'no machines'
+  fi
+  esac
+else
+  _message no more options
+fi
+  fi
+}
+
+_arguments \
+  {-h,--help}'[Prints a short help text and exits.]' \
+  '--version[Prints a short version string and exits.]' \
+  {-p,--property=}'[Limit output to specified property.]:property:(Name Id 
Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
+  {-a,--all}'[Show all proerties]' \
+  (-l,--full)'[Do not ellipsize cgroup members]' \
+  '--no-pager[Do not pipe output into a pager]' \
+  '--no-ask-password[Do not ask for system passwords]' \
+  '--kill-who=[Who to send signal to]:killwho:(leader all)' \
+  {-s,--signal=}'[Which signal to send]:signal:_signals' \
+  {-H,--host=}'[Show information for remote 
host]:userathost:_hosts_or_user_at_host' \
+  {-P,--privileged}'[Acquire privileges before execution]' \
+  '*::machinectl command:_machinectl_command'
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index d0e1f3d..8eced09 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,4 +1,4 @@
-#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-delta systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tmpfiles systemd-tty-ask-password-agent machinectl
+#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-delta systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tmpfiles systemd-tty-ask-password-agent
 
 _ctls()
 {
@@ -98,21 +98,6 @@ _ctls()
 '--plymouth[Ask question with plymouth(8).]' \
 '--console[Ask question on /dev/console.]'
 ;;
-machinectl)
-_arguments \
-{-h,--help}'[Prints a short help text and exits.]' \
-'--version[Prints a short version string and exits.]' \
-{-p,--property=}'[Limit output to specified 
property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader 
Class State RootDirectory)' \
-{-a,--all}'[Show all proerties]' \
-(-l,--full)'[Do not ellipsize cgroup members]' \
-'--no-pager[Do not pipe output into a pager]' \
-'--no-ask-password[Do not ask for system passwords]' \
-'--kill-who=[Who to send signal to]:killwho:(leader all)' \
-{-s,--signal=}'[Which signal to send]:signal:_signals' \
-{-H,--host=}'[Show information for remote 
host]:userathost:_hosts_or_user_at_host' \
-{-P,--privileged}'[Acquire privileges before execution]' \
-'*::machinectl command:_machinectl_command'
-;;
 *) _message 'eh?' ;;
 esac
 }
@@ -130,38 +115,6 @@ _outputmodes() {
 _describe -t output 'output mode' _output_opts || compadd $@
 }
 
-(( $+functions[_machinectl_command] )) || _machinectl_command()
-{
-  local -a _machinectl_cmds
-  _machinectl_cmds=(
-list:List currently running VMs/containers
-status:Show VM/container status
-show:Show properties of one or more VMs/containers
-terminate:Terminate one or more VMs/containers
-kill:Send signal to process or a 

[systemd-devel] [PATCH 15/16] shell-comp: Fix journalctl's --boot

2013-07-30 Thread William Giokas
Actually displays a list of boot ID's and offsets to the user
---
 shell-completion/zsh/_journalctl | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 440e35d..4409fd7 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -39,6 +39,15 @@ _journal_fields() {
 _describe 'possible values' _fields
 }
 
+_journal_boots() {
+  local -a _bootid _previousboots
+  _bootid=( ${(fao)$(_call_program bootid $service -F _BOOT_ID)}  )
+  _previousboots=( -{1..${#_bootid}} )
+  _alternative : \
+offsets:boot offsets:(${_previousboots[1,-2]}) \
+bootid:boot ids:(${_bootid[@]})
+}
+
 _arguments -s \
 {-h,--help}'[Show this help]' \
 '--version[Show package version]' \
@@ -54,7 +63,7 @@ _arguments -s \
 {-x,--catalog}'[Show explanatory texts with each log line]' \
 {-q,--quiet}[Don't show privilege warning] \
 {-m,--merge}'[Show entries from all available journals]' \
-{-b,--boot}'[Show entries from the specified boot only]' \
+{-b,--boot=}'[Show data only from the specified boot or offset]:boot id or 
offset:_journal_boots' \
 {-k,--dmesg}'[Show only kernel messages, Implies -b]' \
 {-u,--unit=}'[Show data only from the specified 
unit]:units:_journal_fields _SYSTEMD_UNIT' \
 '--user-unit[Show data only from the specified user session 
unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \
-- 
1.8.4.rc0.352.g531e8cb

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 16/16] shell-comp: Split out zsh _systemd-tmpfiles

2013-07-30 Thread William Giokas
You can choose to have systemd-tmpfiles at configuration time, so only
install the completion for this if configured to do so.
---
 Makefile.am|  3 +++
 shell-completion/zsh/_systemd  | 12 +---
 shell-completion/zsh/_systemd-tmpfiles | 10 ++
 3 files changed, 14 insertions(+), 11 deletions(-)
 create mode 100644 shell-completion/zsh/_systemd-tmpfiles

diff --git a/Makefile.am b/Makefile.am
index 3713d0d..e35eaeb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1565,6 +1565,9 @@ SYSINIT_TARGET_WANTS += \
systemd-tmpfiles-setup-dev.service \
systemd-tmpfiles-setup.service
 
+dist_zshcompletion_DATA += \
+   shell-completion/zsh/_systemd-tmpfiles
+
 TIMERS_TARGET_WANTS += \
systemd-tmpfiles-clean.timer
 
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 1addfa5..7aab52d 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,4 +1,4 @@
-#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-delta systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tmpfiles systemd-tty-ask-password-agent
+#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-delta systemd-detect-virt systemd-machine-id-setup systemd-notify 
systemd-tty-ask-password-agent
 
 _ctls()
 {
@@ -77,16 +77,6 @@ _ctls()
 '--booted[Returns 0 if the system was booted up with systemd]' 
\
 '--readahead=[Controls disk read-ahead 
operations]:arguments:(cancel done noreply)'
 ;;
-systemd-tmpfiles)
-_arguments \
-'--create[Create, set ownership/permissions based on the 
config files.]' \
-'--clean[Clean up all files and directories with an age 
parameter configured.]' \
-'--remove[All files and directories marked with r, R in the 
configuration files are removed.]' \
-'--prefix=[Only apply rules that apply to paths with the 
specified prefix.]' \
-'--exclude-prefix=[Ignore rules that apply to paths with the 
specified prefix.]' \
-'--help[Prints a short help text and exits.]' \
-'*::files:_files'
-;;
 systemd-tty-ask-password-agent)
 _arguments \
 {-h,--help}'[Prints a short help text and exits.]' \
diff --git a/shell-completion/zsh/_systemd-tmpfiles 
b/shell-completion/zsh/_systemd-tmpfiles
new file mode 100644
index 000..4913ded
--- /dev/null
+++ b/shell-completion/zsh/_systemd-tmpfiles
@@ -0,0 +1,10 @@
+#compdef systemd-tmpfiles
+
+_arguments \
+'--create[Create, set ownership/permissions based on the config files.]' \
+'--clean[Clean up all files and directories with an age parameter 
configured.]' \
+'--remove[All files and directories marked with r, R in the configuration 
files are removed.]' \
+'--prefix=[Only apply rules that apply to paths with the specified 
prefix.]' \
+'--exclude-prefix=[Ignore rules that apply to paths with the specified 
prefix.]' \
+'--help[Prints a short help text and exits.]' \
+'*::files:_files'
-- 
1.8.4.rc0.352.g531e8cb

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 02/16] shell-comp: Split out zsh _systemctl

2013-07-30 Thread William Giokas
---
 Makefile.am |   1 +
 shell-completion/zsh/_systemctl | 340 
 shell-completion/zsh/_systemd   | 327 +-
 3 files changed, 342 insertions(+), 326 deletions(-)
 create mode 100644 shell-completion/zsh/_systemctl

diff --git a/Makefile.am b/Makefile.am
index 27e03ce..bfb70b1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -344,6 +344,7 @@ dist_bashcompletion_DATA = \
shell-completion/bash/kernel-install
 
 dist_zshcompletion_DATA = \
+   shell-completion/zsh/_systemctl \
shell-completion/zsh/_systemd
 
 dist_sysctl_DATA = \
diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl
new file mode 100644
index 000..70d6f33
--- /dev/null
+++ b/shell-completion/zsh/_systemctl
@@ -0,0 +1,340 @@
+#compdef systemctl
+
+(( $+functions[_systemctl_command] )) || _systemctl_command()
+{
+  local -a _systemctl_cmds
+  _systemctl_cmds=(
+list-units:List units
+start:Start (activate) one or more units
+stop:Stop (deactivate) one or more units
+reload:Reload one or more units
+restart:Start or restart one or more units
+condrestart:Restart one or more units if active
+try-restart:Restart one or more units if active
+reload-or-restart:Reload one or more units if possible, otherwise start 
or restart
+force-reload:Reload one or more units if possible, otherwise restart if 
active
+hibernate:Hibernate the system
+hybrid-sleep:Hibernate and suspend the system
+reload-or-try-restart:Reload one or more units if possible, otherwise 
restart if active
+isolate:Start one unit and stop all others
+kill:Send signal to processes of a unit
+is-active:Check whether units are active
+is-failed:Check whether units are failed
+status:Show runtime status of one or more units
+show:Show properties of one or more units/jobs or the manager
+reset-failed:Reset failed state for all, one, or more units
+load:Load one or more units
+list-unit-files:List installed unit files
+enable:Enable one or more unit files
+disable:Disable one or more unit files
+reenable:Reenable one or more unit files
+preset:Enable/disable one or more unit files based on preset 
configuration
+help:Show documentation for specified units
+list-dependencies:Show unit dependency tree
+mask:Mask one or more units
+unmask:Unmask one or more units
+link:Link one or more units files into the search path
+is-enabled:Check whether unit files are enabled
+list-jobs:List jobs
+cancel:Cancel all, one, or more jobs
+dump:Dump server status
+snapshot:Create a snapshot
+delete:Remove one or more snapshots
+show-environment:Dump environment
+set-environment:Set one or more environment variables
+unset-environment:Unset one or more environment variables
+daemon-reload:Reload systemd manager configuration
+daemon-reexec:Reexecute systemd manager
+default:Enter system default mode
+rescue:Enter system rescue mode
+emergency:Enter system emergency mode
+halt:Shut down and halt the system
+suspend:Suspend the system
+poweroff:Shut down and power-off the system
+reboot:Shut down and reboot the system
+kexec:Shut down and reboot the system with kexec
+exit:Ask for user instance termination
+  )
+
+  if (( CURRENT == 1 )); then
+_describe -t commands 'systemctl command' _systemctl_cmds || compadd $@
+  else
+local curcontext=$curcontext
+
+cmd=${${_systemctl_cmds[(r)$words[1]:*]%%:*}}
+# Deal with any aliases
+case $cmd in
+  condrestart) cmd=try-restart;;
+  force-reload) cmd=reload-or-try-restart;;
+esac
+
+if (( $#cmd )); then
+  curcontext=${curcontext%:*:*}:systemctl-${cmd}:
+
+  local update_policy
+  zstyle -s :completion:${curcontext}: cache-policy update_policy
+  if [[ -z $update_policy ]]; then
+zstyle :completion:${curcontext}: cache-policy 
_systemctl_caching_policy
+  fi
+
+  _call_function ret _systemctl_$cmd || _message 'no more arguments'
+else
+  _message unknown systemctl command: $words[1]
+fi
+return ret
+  fi
+}
+
+__systemctl()
+{
+  local -a _modes
+  _modes=(--user --system)
+  systemctl ${words:*_modes} --full --no-legend --no-pager $@
+}
+
+
+# Fills the unit list
+_systemctl_all_units()
+{
+  if ( [[ ${+_sys_all_units} -eq 0 ]] || _cache_invalid SYS_ALL_UNITS ) 
+! _retrieve_cache SYS_ALL_UNITS;
+  then
+_sys_all_units=( $(__systemctl list-units --all | { while read a b; do 
echo  $a; done; }) )
+_store_cache SYS_ALL_UNITS _sys_all_units
+  fi
+}
+
+# Fills the unit list including all file units
+_systemctl_really_all_units()
+{
+  local -a all_unit_files;
+  local -a really_all_units;
+  if ( [[ ${+_sys_really_all_units} -eq 0 ]] || _cache_invalid 
SYS_REALLY_ALL_UNITS ) 
+! _retrieve_cache SYS_REALLY_ALL_UNITS;
+  then
+

[systemd-devel] [PATCH 03/16] shell-comp: Split out zsh _loginctl

2013-07-30 Thread William Giokas
---
 Makefile.am|   3 ++
 shell-completion/zsh/_loginctl | 112 +
 shell-completion/zsh/_systemd  | 109 +--
 3 files changed, 116 insertions(+), 108 deletions(-)
 create mode 100644 shell-completion/zsh/_loginctl

diff --git a/Makefile.am b/Makefile.am
index bfb70b1..9fa7944 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3714,6 +3714,9 @@ rootbin_PROGRAMS += \
 dist_bashcompletion_DATA += \
shell-completion/bash/loginctl
 
+dist_zshcompletion_DATA += \
+   shell-completion/zsh/_loginctl
+
 systemd_inhibit_SOURCES = \
src/login/inhibit.c
 
diff --git a/shell-completion/zsh/_loginctl b/shell-completion/zsh/_loginctl
new file mode 100644
index 000..d121a25
--- /dev/null
+++ b/shell-completion/zsh/_loginctl
@@ -0,0 +1,112 @@
+#compdef loginctl
+
+_hosts_or_user_at_host() {
+  _alternative \
+'users-hosts:: _user_at_host' \
+'hosts:: _hosts'
+}
+
+_loginctl_all_sessions(){_sys_all_sessions=($(loginctl list-sessions | { while 
read a b; do echo  $a; done; }) )}
+_loginctl_all_users()   {_sys_all_users=(   $(loginctl list-users| { while 
read a b; do echo  $a; done; }) )}
+_loginctl_all_seats()   {_sys_all_seats=(   $(loginctl list-seats| { while 
read a b; do echo  $a; done; }) )}
+
+# Completion functions for SESSIONS
+for fun in session-status show-session activate lock-session unlock-session 
terminate-session kill-session ; do
+  (( $+functions[_loginctl_$fun] )) || _loginctl_$fun()
+  {
+_loginctl_all_sessions
+compadd $@ -a - _sys_all_sessions
+  }
+done
+
+# Completion functions for USERS
+for fun in user-status show-user enable-linger disable-linger terminate-user 
kill-user ; do
+  (( $+functions[_loginctl_$fun] )) || _loginctl_$fun()
+  {
+_loginctl_all_users
+compadd $@ -a - _sys_all_users
+  }
+done
+
+# Completion functions for SEATS
+(( $+functions[_loginctl_seats] )) || _loginctl_seats()
+{
+  _loginctl_all_seats
+  compadd $@ -a - _sys_all_seats
+}
+for fun in seat-status show-seat terminate-seat ; do
+  (( $+functions[_loginctl_$fun] )) || _loginctl_$fun()
+  { _loginctl_seats }
+done
+
+# Completion functions for ATTACH
+(( $+functions[_loginctl_attach] )) || _loginctl_attach()
+{
+  _loginctl_all_seats
+
+  _arguments -w -C -S -s \
+':seat:_loginctl_seats' \
+'*:device:_files'
+}
+
+# no loginctl completion for:
+# [STANDALONE]='list-sessions list-users list-seats flush-devices'
+
+(( $+functions[_loginctl_command] )) || _loginctl_command()
+{
+  local -a _loginctl_cmds
+  _loginctl_cmds=(
+list-sessions:List sessions
+session-status:Show session status
+show-session:Show properties of one or more sessions
+activate:Activate a session
+lock-session:Screen lock one or more sessions
+unlock-session:Screen unlock one or more sessions
+terminate-session:Terminate one or more sessions
+kill-session:Send signal to processes of a session
+list-users:List users
+user-status:Show user status
+show-user:Show properties of one or more users
+enable-linger:Enable linger state of one or more users
+disable-linger:Disable linger state of one or more users
+terminate-user:Terminate all sessions of one or more users
+kill-user:Send signal to processes of a user
+list-seats:List seats
+seat-status:Show seat status
+show-seat:Show properties of one or more seats
+attach:Attach one or more devices to a seat
+flush-devices:Flush all device associations
+terminate-seat:Terminate all sessions on one or more seats
+  )
+
+  if (( CURRENT == 1 )); then
+_describe -t commands 'loginctl command' _loginctl_cmds || compadd $@
+  else
+local curcontext=$curcontext
+
+cmd=${${_loginctl_cmds[(r)$words[1]:*]%%:*}}
+
+if (( $#cmd )); then
+  curcontext=${curcontext%:*:*}:loginctl-${cmd}:
+
+  _call_function ret _loginctl_$cmd || _message 'no more arguments'
+else
+  _message unknown loginctl command: $words[1]
+fi
+return ret
+  fi
+}
+
+
+_arguments -s \
+{-h,--help}'[Show help]' \
+'--version[Show package version]' \
+\*{-p,--property=}'[Show only properties by this name]:unit property' \
+{-a,--all}'[Show all properties, including empty ones]' \
+'--kill-who=[Who to send signal to]:killwho:(main control all)' \
+{-s,--signal=}'[Which signal to send]:signal:_signals' \
+'--no-ask-password[Do not ask for system passwords]' \
+{-H,--host=}'[Show information for remote 
host]:userathost:_hosts_or_user_at_host' \
+{-P,--privileged}'[Acquire privileges before execution]' \
+'--no-pager[Do not pipe output into a pager]' \
+'*::loginctl command:_loginctl_command'
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 64e0994..80a14ac 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,24 +1,9 @@
-#compdef loginctl journalctl hostnamectl localectl 

[systemd-devel] [PATCH 04/16] shell-comp: Split out zsh _hostnamectl

2013-07-30 Thread William Giokas
---
 Makefile.am   |  3 +++
 shell-completion/zsh/_hostnamectl | 38 ++
 shell-completion/zsh/_systemd | 34 +-
 3 files changed, 42 insertions(+), 33 deletions(-)
 create mode 100644 shell-completion/zsh/_hostnamectl

diff --git a/Makefile.am b/Makefile.am
index 9fa7944..ba40350 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3363,6 +3363,9 @@ bin_PROGRAMS += \
 dist_bashcompletion_DATA += \
shell-completion/bash/hostnamectl
 
+dist_zshcompletion_DATA += \
+   shell-completion/zsh/_hostnamectl
+
 endif
 
 polkitpolicy_in_files += \
diff --git a/shell-completion/zsh/_hostnamectl 
b/shell-completion/zsh/_hostnamectl
new file mode 100644
index 000..bc4441d
--- /dev/null
+++ b/shell-completion/zsh/_hostnamectl
@@ -0,0 +1,38 @@
+#compdef hostnamectl
+
+_hosts_or_user_at_host() {
+  _alternative \
+'users-hosts:: _user_at_host' \
+'hosts:: _hosts'
+}
+
+_hostnamectl_command() {
+local -a _hostnamectl_cmds
+_hostnamectl_cmds=(
+status:Show current hostname settings
+set-hostname:Set system hostname
+set-icon-name:Set icon name for host
+)
+if (( CURRENT == 1 )); then
+_describe -t commands 'hostnamectl commands' _hostnamectl_cmds || 
compadd $@
+else
+local curcontext=$curcontext
+cmd=${${_hostnamectl_cmds[(r)$words[1]:*]%%:*}}
+if (( $#cmd )); then
+[[ $cmd == status ]]  msg=no options || msg=options for $cmd
+_message $msg
+else
+_message unknown hostnamectl command: $words[1]
+fi
+fi
+}
+
+_arguments -s \
+{-h,--help}'[Show this help]' \
+'--version[Show package version]' \
+'--transient[Only set transient hostname]' \
+'--static[Only set static hostname]' \
+'--pretty[Only set pretty hostname]' \
+'--no-ask-password[Do not prompt for password]' \
+{-H,--host=}'[Operate on remote host]:userathost:_hosts_or_user_at_host' \
+'*::hostnamectl commands:_hostnamectl_command'
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 80a14ac..ce7ea1a 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,20 +1,9 @@
-#compdef journalctl hostnamectl localectl timedatectl systemd-coredumpctl 
udevadm systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
+#compdef journalctl localectl timedatectl systemd-coredumpctl udevadm 
systemd-analyze systemd-cat systemd-ask-password systemd-cgls systemd-cgtop 
systemd-delta systemd-detect-virt systemd-inhibit systemd-machine-id-setup 
systemd-notify systemd-nspawn systemd-tmpfiles systemd-tty-ask-password-agent 
machinectl
 
 _ctls()
 {
 local curcontext=$curcontext state lstate line
 case $service in
-hostnamectl)
-_arguments -s \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-'--transient[Only set transient hostname]' \
-'--static[Only set static hostname]' \
-'--pretty[Only set pretty hostname]' \
-'--no-ask-password[Do not prompt for password]' \
-{-H,--host=}'[Operate on remote 
host]:userathost:_hosts_or_user_at_host' \
-'*::hostnamectl commands:_hostnamectl_command'
-;;
 journalctl)
 _arguments -s \
 '--since=[Start showing entries newer or of the specified 
date]:-MM-DD HH\:MM\:SS' \
@@ -323,27 +312,6 @@ _journal_fields() {
 _describe 'possible values' _fields
 }
 
-_hostnamectl_command() {
-local -a _hostnamectl_cmds
-_hostnamectl_cmds=(
-status:Show current hostname settings
-set-hostname:Set system hostname
-set-icon-name:Set icon name for host
-)
-if (( CURRENT == 1 )); then
-_describe -t commands 'hostnamectl commands' _hostnamectl_cmds || 
compadd $@
-else
-local curcontext=$curcontext
-cmd=${${_hostnamectl_cmds[(r)$words[1]:*]%%:*}}
-if (( $#cmd )); then
-[[ $cmd == status ]]  msg=no options || msg=options for $cmd
-_message $msg
-else
-_message unknown hostnamectl command: $words[1]
-fi
-fi
-}
-
 _localectl_set-locale() {
 local -a _confs _locales
 local expl suf
-- 
1.8.4.rc0.352.g531e8cb

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 05/16] shell-comp: Split out zsh _journalctl

2013-07-30 Thread William Giokas
Re-ordered some of the options and added a few that were missing
previously as well.
---
 Makefile.am  |  1 +
 shell-completion/zsh/_journalctl | 83 
 shell-completion/zsh/_systemd| 70 +
 3 files changed, 85 insertions(+), 69 deletions(-)
 create mode 100644 shell-completion/zsh/_journalctl

diff --git a/Makefile.am b/Makefile.am
index ba40350..e331e67 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -345,6 +345,7 @@ dist_bashcompletion_DATA = \
 
 dist_zshcompletion_DATA = \
shell-completion/zsh/_systemctl \
+   shell-completion/zsh/_journalctl \
shell-completion/zsh/_systemd
 
 dist_sysctl_DATA = \
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
new file mode 100644
index 000..440e35d
--- /dev/null
+++ b/shell-completion/zsh/_journalctl
@@ -0,0 +1,83 @@
+#compdef journalctl
+
+_outputmodes() {
+local -a _output_opts
+_output_opts=(short short-monotonic verbose export json json-pretty 
json-see cat)
+_describe -t output 'output mode' _output_opts || compadd $@
+}
+
+_list_fields() {
+local -a journal_fields
+journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}
+ERRNO SYSLOG_{FACILITY,IDENTIFIER,PID}
+_{P,U,G}ID _COMM _EXE _CMDLINE
+_AUDIT_{SESSION,LOGINUID}
+_SYSTEMD_{CGROUP,SESSION,UNIT,OWNER_UID}
+_SYSTEMD_USER_UNIT
+_SELINUX_CONTEXT _SOURCE_REALTIME_TIMESTAMP
+_{BOOT,MACHINE}_ID _HOSTNAME _TRANSPORT
+_KERNEL_{DEVICE,SUBSYSTEM}
+_UDEV_{SYSNAME,DEVNODE,DEVLINK}
+__CURSOR __{REALTIME,MONOTONIC}_TIMESTAMP)
+_describe 'possible fields' journal_fields
+}
+
+_journal_none() {
+local -a _commands _files
+_commands=( ${(f)$(_call_program commands $service -F _EXE 
2/dev/null)} )
+_alternative : \
+'files:/dev files:_files -W /dev -P /dev/' \
+commands:commands:($_commands[@]) \
+'fields:fields:_list_fields'
+}
+
+_journal_fields() {
+local -a _fields cmd
+cmd=(journalctl -F ${@[-1]} 2/dev/null )
+_fields=( ${(f)$(_call_program fields $cmd[@])} )
+typeset -U _fields
+_describe 'possible values' _fields
+}
+
+_arguments -s \
+{-h,--help}'[Show this help]' \
+'--version[Show package version]' \
+'--no-pager[Do not pipe output into a pager]' \
+{-l,--full}'[Show long fields in full]' \
+{-a,--all}'[Show all fields, including long and unprintable]' \
+{-f,--follow}'[Follow journal]' \
+{-e,--pager-end}'[Jump to the end of the journal in the pager]' \
+{-n,--lines=}'[Number of journal entries to show]:integer' \
+'--no-tail[Show all lines, even in follow mode]' \
+{-r,--reverse}'[Reverse output]' \
+{-o,--output=}'[Change journal output mode]:output modes:_outputmodes' \
+{-x,--catalog}'[Show explanatory texts with each log line]' \
+{-q,--quiet}[Don't show privilege warning] \
+{-m,--merge}'[Show entries from all available journals]' \
+{-b,--boot}'[Show entries from the specified boot only]' \
+{-k,--dmesg}'[Show only kernel messages, Implies -b]' \
+{-u,--unit=}'[Show data only from the specified 
unit]:units:_journal_fields _SYSTEMD_UNIT' \
+'--user-unit[Show data only from the specified user session 
unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \
+{-p,--priority=}'[Show only messages within the specified priority 
range]:priority:_journal_fields PRIORITY' \
+{-c,--cursor=}'[Start showing entries from specified 
cursor]:cursors:_journal_fields __CURSORS' \
+'--after-cursor=[Start showing entries from the location in the journal 
after the cursor]:cursors:_journal_fields __CURSORS' \
+'--since=[Start showing entries newer or of the specified date]:-MM-DD 
HH\:MM\:SS' \
+'--until=[Stop showing entries older or of the specified date]:-MM-DD 
HH\:MM\:SS' \
+{-F,--field=}'[List all values a certain field takes]:Fields:_list_fields' 
\
+'--system[Show system and kernel messages]' \
+'--user[Show messages from user services]' \
+{-D,--directory=}'[Show journal files from 
directory]:directories:_directories' \
+'--file=[Operate on specified journal files]:file:_files' \
+'--root=[Operate on catalog hierarchy under specified 
directory]:directories:_directories' \
+'--new-id128[Generate a new 128 Bit ID]' \
+'--header[Show journal header information]' \
+'--disk-usage[Show total disk usage]' \
+'--list-catalog[List messages in catalog]' \
+'--dump-catalog[Dump messages in catalog]' \
+'--update-catalog[Update binary catalog database]' \
+'--setup-keys[Generate new FSS key pair]' \
+'--force[Force recreation of FSS keys]' \
+'--interval=[Time interval for changing the FSS sealing key]:time 
interval' \
+'--verify[Verify journal 

[systemd-devel] [PATCH 06/16] shell-comp: Split out zsh _localectl

2013-07-30 Thread William Giokas
---
 Makefile.am |  3 ++
 shell-completion/zsh/_localectl | 89 +
 shell-completion/zsh/_systemd   | 86 +--
 3 files changed, 93 insertions(+), 85 deletions(-)
 create mode 100644 shell-completion/zsh/_localectl

diff --git a/Makefile.am b/Makefile.am
index e331e67..64d4785 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3443,6 +3443,9 @@ bin_PROGRAMS += \
 dist_bashcompletion_DATA += \
shell-completion/bash/localectl
 
+dist_zshcompletion_DATA += \
+   shell-completion/zsh/_localectl
+
 endif
 
 polkitpolicy_in_files += \
diff --git a/shell-completion/zsh/_localectl b/shell-completion/zsh/_localectl
new file mode 100644
index 000..0beed4f
--- /dev/null
+++ b/shell-completion/zsh/_localectl
@@ -0,0 +1,89 @@
+#compdef localectl
+
+_localectl_set-locale() {
+local -a _confs _locales
+local expl suf
+_locales=( ${(f)$(_call_program locales $service list-locales)} )
+_confs=( ${${(f)$(_call_program confs locale 2/dev/null)}%\=*} )
+if [[ -prefix 1 *\= ]]; then
+local conf=${PREFIX%%\=*}
+compset -P1 '*='
+_wanted locales expl locales configs \
+_combination localeconfs  confs=$conf locales $@ -
+else
+compadd -S '='  $_confs
+fi
+}
+
+_localectl_set-keymap() {
+local -a _keymaps
+_keymaps=( ${(f)$(_call_program locales $service list-keymaps)} )
+if (( CURRENT = 3 )); then
+_describe keymaps _keymaps
+else
+_message no more options
+fi
+}
+
+_localectl_set-x11-keymap() {
+if (( $+commands[pkg-config] )); then
+local -a _file _layout _model _variant _options
+local _xorg_lst
+_xorg_lst=${$($commands[pkg-config] xkeyboard-config 
--variable=xkb_base)}
+_file=( ${(ps:\n\!:)$($_xorg_lst/rules/xorg.lst)} )
+_layout=( ${${${(M)${(f)_file[1]}:#  *}#  }%% *} )
+_model=( ${${${(M)${(f)_file[2]}:#  *}#  }%% *} )
+_variant=( ${${${(M)${(f)_file[3]}:#  *}#  }%% *} )
+_options=( ${${${(M)${(f)_file[4]}:#  *}#  }%% *} )
+#_layout=( ${(f)$( echo $_file[1] | awk '/^  / {print $1}' )} )
+#_model=( ${(f)$(echo $_file[2] | awk '/^  / {print $1}')} )
+#_variant=( ${(f)$(echo $_file[3] | awk '/^  / {print $1}')} )
+#_options=( ${(f)$(echo ${_file[4]//:/\\:} | awk '/^  / {print 
$1}')} )
+
+case $CURRENT in
+2) _describe layouts _layout ;;
+3) _describe models _model;;
+4) _describe variants _variant;;
+5) _describe options _options;;
+*) _message no more options
+esac
+fi
+}
+
+_localectl_command() {
+local -a _localectl_cmds
+_localectl_cmds=(
+'status:Show current locale settings'
+'set-locale:Set system locale'
+'list-locales:Show known locales'
+'set-keymap:Set virtual console keyboard mapping'
+'list-keymaps:Show known virtual console keyboard mappings'
+'set-x11-keymap:Set X11 keyboard mapping'
+)
+if (( CURRENT == 1 )); then
+_describe -t commands 'localectl command' _localectl_cmds
+else
+local curcontext=$curcontext
+cmd=${${_localectl_cmds[(r)$words[1]:*]%%:*}}
+if (( $+functions[_localectl_$cmd] )); then
+_localectl_$cmd
+else
+_message no more options
+fi
+fi
+}
+
+_hosts_or_user_at_host() {
+  _alternative \
+'users-hosts:: _user_at_host' \
+'hosts:: _hosts'
+}
+
+_arguments \
+{-h,--help}'[Show this help]' \
+'--version[Show package version]' \
+--no-convert[Don't convert keyboard mappings] \
+'--no-pager[Do not pipe output into a pager]' \
+'--no-ask-password[Do not prompt for password]' \
+{-H,--host=}'[Operate on remote host]:userathost:_hosts_or_user_at_host' \
+'*::localectl commands:_localectl_command'
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 488d460..70746ef 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,19 +1,9 @@
-#compdef localectl timedatectl systemd-coredumpctl udevadm systemd-analyze 
systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-delta 
systemd-detect-virt systemd-inhibit systemd-machine-id-setup systemd-notify 
systemd-nspawn systemd-tmpfiles systemd-tty-ask-password-agent machinectl
+#compdef timedatectl systemd-coredumpctl udevadm systemd-analyze systemd-cat 
systemd-ask-password systemd-cgls systemd-cgtop systemd-delta 
systemd-detect-virt systemd-inhibit systemd-machine-id-setup systemd-notify 
systemd-nspawn systemd-tmpfiles systemd-tty-ask-password-agent machinectl
 
 _ctls()
 {
 local curcontext=$curcontext state lstate line
 case $service in
-localectl)
-_arguments \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
---no-convert[Don't 

[systemd-devel] [PATCH 07/16] shell-comp: Split out zsh _coredumpctl

2013-07-30 Thread William Giokas
---
 Makefile.am   |  3 +++
 shell-completion/zsh/_systemd | 38 +--
 shell-completion/zsh/_systemd-coredumpctl | 34 +++
 3 files changed, 38 insertions(+), 37 deletions(-)
 create mode 100644 shell-completion/zsh/_systemd-coredumpctl

diff --git a/Makefile.am b/Makefile.am
index 64d4785..cf764cd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3104,6 +3104,9 @@ bin_PROGRAMS += \
 dist_bashcompletion_DATA += \
shell-completion/bash/systemd-coredumpctl
 
+dist_zshcompletion_DATA += \
+   shell-completion/zsh/_systemd-coredumpctl
+
 sysctl_DATA = \
sysctl.d/50-coredump.conf
 
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 70746ef..1d0f840 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,18 +1,9 @@
-#compdef timedatectl systemd-coredumpctl udevadm systemd-analyze systemd-cat 
systemd-ask-password systemd-cgls systemd-cgtop systemd-delta 
systemd-detect-virt systemd-inhibit systemd-machine-id-setup systemd-notify 
systemd-nspawn systemd-tmpfiles systemd-tty-ask-password-agent machinectl
+#compdef timedatectl udevadm systemd-analyze systemd-cat systemd-ask-password 
systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
 
 _ctls()
 {
 local curcontext=$curcontext state lstate line
 case $service in
-systemd-coredumpctl)
-_arguments \
-{-o,--output=}'[Write output to FILE]:output file:_files' \
-'--no-pager[Do not pipe output into a pager]' \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-'*::systemd-coredumpctl commands:_systemd-coredumpctl_command'
-
-;;
 timedatectl)
 _arguments -s \
 {-h,--help}'[Show this help]' \
@@ -288,33 +279,6 @@ _timedatectl_command(){
 fi
 fi
 }
-_systemd-coredumpctl_command(){
-local -a _systemd_coredumpctl_cmds
-_systemd_coredumpctl_cmds=(
-'list:List available coredumps'
-'dump:Print coredump to std'
-)
-if (( CURRENT == 1 )); then
-_describe -t commands 'systemd-coredumpctl command' 
_systemd_coredumpctl_cmds
-else
-local curcontext=$curcontext
-local -a _dumps
-cmd=${${_systemd_coredumpctl_cmds[(r)$words[1]:*]%%:*}}
-if (( $#cmd  )); then
-   # user can set zstyle 
':completion:*:*:systemd-coredumpctl:*' sort no for coredumps to be ordered by 
date, otherwise they get ordered by pid
-   _dumps=( ${(foa)$(systemd-coredumpctl list | awk 
'BEGIN{OFS=:} /^\s/ {sub(/[[ \t]+/, ); print $5,$0}' 2/dev/null)} )
-if [[ -n $_dumps ]]; then
-_describe -t pids 'coredumps' _dumps
-else
-_message no coredumps
-fi
-else
-_message no more options
-fi
-
-fi
-
-}
 
 (( $+functions[_machinectl_command] )) || _machinectl_command()
 {
diff --git a/shell-completion/zsh/_systemd-coredumpctl 
b/shell-completion/zsh/_systemd-coredumpctl
new file mode 100644
index 000..f5d12cb
--- /dev/null
+++ b/shell-completion/zsh/_systemd-coredumpctl
@@ -0,0 +1,34 @@
+#compdef systemd-coredumpctl
+
+_systemd-coredumpctl_command(){
+local -a _systemd_coredumpctl_cmds
+_systemd_coredumpctl_cmds=(
+'list:List available coredumps'
+'dump:Print coredump to std'
+)
+if (( CURRENT == 1 )); then
+_describe -t commands 'systemd-coredumpctl command' 
_systemd_coredumpctl_cmds
+else
+local curcontext=$curcontext
+local -a _dumps
+cmd=${${_systemd_coredumpctl_cmds[(r)$words[1]:*]%%:*}}
+if (( $#cmd  )); then
+   # user can set zstyle 
':completion:*:*:systemd-coredumpctl:*' sort no for coredumps to be ordered by 
date, otherwise they get ordered by pid
+   _dumps=( ${(foa)$(systemd-coredumpctl list | awk 
'BEGIN{OFS=:} /^\s/ {sub(/[[ \t]+/, ); print $5,$0}' 2/dev/null)} )
+if [[ -n $_dumps ]]; then
+_describe -t pids 'coredumps' _dumps
+else
+_message no coredumps
+fi
+else
+_message no more options
+fi
+fi
+}
+
+_arguments \
+{-o,--output=}'[Write output to FILE]:output file:_files' \
+'--no-pager[Do not pipe output into a pager]' \
+{-h,--help}'[Show this help]' \
+'--version[Show package version]' \
+'*::systemd-coredumpctl commands:_systemd-coredumpctl_command'
-- 
1.8.4.rc0.352.g531e8cb

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 08/16] shell-comp: Split out zsh _timedatectl

2013-07-30 Thread William Giokas
---
 Makefile.am   |  3 ++
 shell-completion/zsh/_systemd | 67 +---
 shell-completion/zsh/_timedatectl | 71 +++
 3 files changed, 75 insertions(+), 66 deletions(-)
 create mode 100644 shell-completion/zsh/_timedatectl

diff --git a/Makefile.am b/Makefile.am
index cf764cd..cdf5c46 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3518,6 +3518,9 @@ bin_PROGRAMS += \
 
 dist_bashcompletion_DATA += \
shell-completion/bash/timedatectl
+
+dist_zshcompletion_DATA += \
+   shell-completion/zsh/_timedatectl
 endif
 
 polkitpolicy_in_files += \
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 1d0f840..7e23d78 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,19 +1,9 @@
-#compdef timedatectl udevadm systemd-analyze systemd-cat systemd-ask-password 
systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
+#compdef udevadm systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
 
 _ctls()
 {
 local curcontext=$curcontext state lstate line
 case $service in
-timedatectl)
-_arguments -s \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
-'--adjust-system-clock[Adjust system clock when changing local 
RTC mode]' \
-'--no-pager[Do not pipe output into a pager]' \
-'--no-ask-password[Do not prompt for password]' \
-{-H,--host=}'[Operate on remote 
host]:userathost:_hosts_or_user_at_host' \
-'*::timedatectl commands:_timedatectl_command'
-;;
 udevadm)
 _arguments \
 '--debug[Print debug messages to stderr]' \
@@ -225,61 +215,6 @@ _outputmodes() {
 _describe -t output 'output mode' _output_opts || compadd $@
 }
 
-_timedatectl_set-timezone(){
-local -a _timezones
-_timezones=( ${(f)$(_call_program timezones ${service} 
list-timezones)} )
-compadd $_timezones[@]
-}
-
-_timedatectl_set-time(){
-_message -MM-DD HH:MM:SS
-}
-
-_timedatectl_set-local-rtc(){
-local -a _options
-_options=(
-'0:Maintain RTC in universal time'
-'1:Maintain RTC in local time'
-)
-_describe options _options
-}
-
-_timedatectl_set-ntp(){
-local -a _options
-_options=(
-'0:Disable NTP based network time configuration'
-'1:Enable NTP based network time configuration'
-)
-_describe options _options
-}
-
-_timedatectl_command(){
-local -a _timedatectl_cmds
-_timedatectl_cmds=(
-'status:Show current time settings'
-'set-time:Set system time'
-'set-timezone:Set system timezone'
-'list-timezones:Show known timezones'
-'set-local-rtc:Control whether RTC is in local time'
-'set-ntp:Control whether NTP is enabled'
-)
-if (( CURRENT == 1 )); then
-_describe -t commands 'timedatectl command' _timedatectl_cmds
-else
-local curcontext=$curcontext
-cmd=${${_timedatectl_cmds[(r)$words[1]:*]%%:*}}
-if (( $#cmd )); then
-if (( $+functions[_timedatectl_$cmd] )); then
-_timedatectl_$cmd
-else
-_message no more options
-fi
-else
-_message unknown timedatectl command: $words[1]
-fi
-fi
-}
-
 (( $+functions[_machinectl_command] )) || _machinectl_command()
 {
   local -a _machinectl_cmds
diff --git a/shell-completion/zsh/_timedatectl 
b/shell-completion/zsh/_timedatectl
new file mode 100644
index 000..091b6f1
--- /dev/null
+++ b/shell-completion/zsh/_timedatectl
@@ -0,0 +1,71 @@
+#compdef timedatectl
+
+_timedatectl_set-timezone(){
+local -a _timezones
+_timezones=( ${(f)$(_call_program timezones ${service} 
list-timezones)} )
+compadd $_timezones[@]
+}
+
+_timedatectl_set-time(){
+_message -MM-DD HH:MM:SS
+}
+
+_timedatectl_set-local-rtc(){
+local -a _options
+_options=(
+'0:Maintain RTC in universal time'
+'1:Maintain RTC in local time'
+)
+_describe options _options
+}
+
+_timedatectl_set-ntp(){
+local -a _options
+_options=(
+'0:Disable NTP based network time configuration'
+'1:Enable NTP based network time configuration'
+)
+_describe options _options
+}
+
+_timedatectl_command(){
+local -a _timedatectl_cmds
+_timedatectl_cmds=(
+'status:Show current time settings'
+'set-time:Set system time'
+'set-timezone:Set system timezone'
+'list-timezones:Show known timezones'
+

[systemd-devel] [PATCH 09/16] shell-comp: Split out zsh _udevadm

2013-07-30 Thread William Giokas
---
 Makefile.am   |   1 +
 shell-completion/zsh/_systemd | 142 +-
 shell-completion/zsh/_udevadm | 141 +
 3 files changed, 143 insertions(+), 141 deletions(-)
 create mode 100644 shell-completion/zsh/_udevadm

diff --git a/Makefile.am b/Makefile.am
index cdf5c46..c96c8b1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -346,6 +346,7 @@ dist_bashcompletion_DATA = \
 dist_zshcompletion_DATA = \
shell-completion/zsh/_systemctl \
shell-completion/zsh/_journalctl \
+   shell-completion/zsh/_udevadm \
shell-completion/zsh/_systemd
 
 dist_sysctl_DATA = \
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 7e23d78..78cb061 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,16 +1,9 @@
-#compdef udevadm systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
+#compdef systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
 
 _ctls()
 {
 local curcontext=$curcontext state lstate line
 case $service in
-udevadm)
-_arguments \
-'--debug[Print debug messages to stderr]' \
-'--version[Print version number]' \
-'--help[Print help text]' \
-'*::udevadm commands:_udevadm_command'
-;;
 systemd-analyze)
 _arguments \
 {-h,--help}'[Show help text.]' \
@@ -247,139 +240,6 @@ _outputmodes() {
   fi
 }
 
-_udevadm_info(){
-_arguments \
-'--query=[Query the database for specified type of device data. It 
needs the --path or --name to identify the specified device.]:type:(name 
symlink path property all)' \
-'--path=[The devpath of the device to query.]:sys files:_files -P 
/sys/ -W /sys' \
-'--name=[The name of the device node or a symlink to query]:device 
files:_files -P /dev/ -W /dev' \
-'--root[Print absolute paths in name or symlink query.]' \
-'--attribute-walk[Print all sysfs properties of the specified device 
that can be used in udev rules to match the specified device]' \
-'--export[Print output as key/value pairs.]' \
-'--export-prefix=[Add a prefix to the key name of exported 
values.]:prefix' \
-'--device-id-of-file=[Print major/minor numbers of the underlying 
device, where the file lives on.]:files:_udevadm_mounts' \
-'--export-db[Export the content of the udev database.]' \
-'--cleanup-db[Cleanup the udev database.]'
-}
-
-_udevadm_trigger(){
-_arguments \
-'--verbose[Print the list of devices which will be triggered.]' \
-'--dry-run[Do not actually trigger the event.]' \
-'--type=[Trigger a specific type of devices.]:types:(devices 
subsystems failed)' \
-'--action=[Type of event to be triggered.]:actions:(add change 
remove)' \
-'--subsystem-match=[Trigger events for devices which belong to a 
matching subsystem.]' \
-'--subsystem-nomatch=[Do not trigger events for devices which belong 
to a matching subsystem.]' \
-'--attr-match=attribute=[Trigger events for devices with a matching 
sysfs attribute.]' \
-'--attr-nomatch=attribute=[Do not trigger events for devices with a 
matching sysfs attribute.]' \
-'--property-match=[Trigger events for devices with a matching property 
value.]' \
-'--tag-match=property[Trigger events for devices with a matching 
tag.]' \
-'--sysname-match=[Trigger events for devices with a matching sys 
device name.]' \
-'--parent-match=[Trigger events for all children of a given device.]'
-}
-
-_udevadm_settle(){
-_arguments \
-   '--timeout=[Maximum number of seconds to wait for the event queue to 
become empty.]' \
-   '--seq-start=[Wait only for events after the given sequence number.]' \
-   '--seq-end=[Wait only for events before the given sequence number.]' \
-   '--exit-if-exists=[Stop waiting if file exists.]:files:_files' \
-   '--quiet[Do not print any output, like the remaining queue entries when 
reaching the timeout.]' \
-   '--help[Print help text.]'
-}
-
-_udevadm_control(){
-_arguments \
-'--exit[Signal and wait for systemd-udevd to exit.]' \
-'--log-priority=[Set the internal log level of 
systemd-udevd.]:priorities:(err info debug)' \
-'--stop-exec-queue[Signal systemd-udevd to stop executing new events. 
Incoming events will be queued.]' \
-'--start-exec-queue[Signal systemd-udevd to enable the execution of 
events.]' \
-'--reload[Signal 

[systemd-devel] [PATCH 10/16] shell-comp: Split out zsh _systemd-nspawn

2013-07-30 Thread William Giokas
---
 Makefile.am  |  1 +
 shell-completion/zsh/_systemd| 26 +-
 shell-completion/zsh/_systemd-nspawn | 24 
 3 files changed, 26 insertions(+), 25 deletions(-)
 create mode 100644 shell-completion/zsh/_systemd-nspawn

diff --git a/Makefile.am b/Makefile.am
index c96c8b1..24e4fa4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -347,6 +347,7 @@ dist_zshcompletion_DATA = \
shell-completion/zsh/_systemctl \
shell-completion/zsh/_journalctl \
shell-completion/zsh/_udevadm \
+   shell-completion/zsh/_systemd-nspawn \
shell-completion/zsh/_systemd
 
 dist_sysctl_DATA = \
diff --git a/shell-completion/zsh/_systemd b/shell-completion/zsh/_systemd
index 78cb061..bacf179 100644
--- a/shell-completion/zsh/_systemd
+++ b/shell-completion/zsh/_systemd
@@ -1,4 +1,4 @@
-#compdef systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
+#compdef systemd-analyze systemd-cat systemd-ask-password systemd-cgls 
systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
 
 _ctls()
 {
@@ -96,20 +96,6 @@ _ctls()
 '--booted[Returns 0 if the system was booted up with systemd]' 
\
 '--readahead=[Controls disk read-ahead 
operations]:arguments:(cancel done noreply)'
 ;;
-systemd-nspawn)
-_arguments \
-{-h,--help}'[Show this help]' \
-{--directory=,-D}'[Directory to use as file system root for 
the namespace container. If omitted the current directory will be 
used.]:directories:_directories' \
-{--boot,-b}'[Automatically search for an init binary and 
invoke it instead of a shell or a user supplied program.]' \
-{--user=,-u}'[Run the command under specified user, create 
home directory and cd into it.]' \
-'--uuid=[Set the specified uuid for the container.]' \
-{--controllers=,-C}'[Makes the container appear in other 
hierarchies than the name=systemd:/ one. Takes a comma-separated list of 
controllers.]' \
-'--private-network[Turn off networking in the container. This 
makes all network interfaces unavailable in the container, with the exception 
of the loopback device.]' \
-'--read-only[Mount the root file system read only for the 
container.]' \
-'--capability=[List one or more additional capabilities to 
grant the container.]:capabilities:_systemd-nspawn' \
---link-journal=[Control whether the container's journal shall 
be made visible to the host system.]:options:(no, host, guest, auto) \
-'-j[Equivalent to --link-journal=guest.]'
-;;
 systemd-tmpfiles)
 _arguments \
 '--create[Create, set ownership/permissions based on the 
config files.]' \
@@ -150,16 +136,6 @@ _ctls()
 esac
 }
 
-_systemd-nspawn(){
-local -a _caps
-_caps=( CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH
-CAP_FOWNER CAP_FSETID CAP_IPC_OWNER CAP_KILL CAP_LEASE 
CAP_LINUX_IMMUTABLE
-CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETGID 
CAP_SETFCAP CAP_SETPCAP
-CAP_SETUID CAP_SYS_ADMIN CAP_SYS_CHROOT CAP_SYS_NICE 
CAP_SYS_PTRACE CAP_SYS_TTY_CONFIG
-CAP_SYS_RESOURCE CAP_SYS_BOOT )
-_values -s , 'capabilities' $_caps[@]
-}
-
 _systemd_inhibit_command(){
 if (( CURRENT == 1 )); then
 compset -q
diff --git a/shell-completion/zsh/_systemd-nspawn 
b/shell-completion/zsh/_systemd-nspawn
new file mode 100644
index 000..4612a44
--- /dev/null
+++ b/shell-completion/zsh/_systemd-nspawn
@@ -0,0 +1,24 @@
+#compdef systemd-nspawn
+
+_systemd-nspawn(){
+local -a _caps
+_caps=( CAP_CHOWN CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH
+CAP_FOWNER CAP_FSETID CAP_IPC_OWNER CAP_KILL CAP_LEASE 
CAP_LINUX_IMMUTABLE
+CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETGID 
CAP_SETFCAP CAP_SETPCAP
+CAP_SETUID CAP_SYS_ADMIN CAP_SYS_CHROOT CAP_SYS_NICE 
CAP_SYS_PTRACE CAP_SYS_TTY_CONFIG
+CAP_SYS_RESOURCE CAP_SYS_BOOT )
+_values -s , 'capabilities' $_caps[@]
+}
+
+_arguments \
+{-h,--help}'[Show this help]' \
+{--directory=,-D}'[Directory to use as file system root for the namespace 
container. If omitted the current directory will be 
used.]:directories:_directories' \
+{--boot,-b}'[Automatically search for an init binary and invoke it instead 
of a shell or a user supplied program.]' \
+{--user=,-u}'[Run the command under specified user, create home directory 
and cd into it.]' \
+'--uuid=[Set the specified uuid for the container.]' \
+

[systemd-devel] [PATCH 01/16] shell-completion: fix zsh completion installation

2013-07-30 Thread William Giokas
Moved zsh shell completion to shell-completion/zsh/_systemd for
automake's sake. Also allow users to specify where the files should go
with::

  ./configure --with-zshcompletiondir=/path/to/some/where

and by default going to `$datadir/zsh/site-functions`
---

My server is down for maintenance, so I'll be putting these on the ml
directly.

 Makefile.am   | 8 +---
 configure.ac  | 6 ++
 shell-completion/{systemd-zsh-completion.zsh = zsh/_systemd} | 0
 3 files changed, 11 insertions(+), 3 deletions(-)
 rename shell-completion/{systemd-zsh-completion.zsh = zsh/_systemd} (100%)

diff --git a/Makefile.am b/Makefile.am
index c81c40c..27e03ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,6 +68,7 @@ pkgconfigdatadir=$(datadir)/pkgconfig
 pkgconfiglibdir=$(libdir)/pkgconfig
 polkitpolicydir=$(datadir)/polkit-1/actions
 bashcompletiondir=@bashcompletiondir@
+zshcompletiondir=@zshcompletiondir@
 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
@@ -342,6 +343,9 @@ dist_bashcompletion_DATA = \
shell-completion/bash/udevadm \
shell-completion/bash/kernel-install
 
+dist_zshcompletion_DATA = \
+   shell-completion/zsh/_systemd
+
 dist_sysctl_DATA = \
sysctl.d/50-default.conf
 
@@ -4234,9 +4238,6 @@ EXTRA_DIST += \
docs/sysvinit/README.in \
docs/var-log/README.in
 
-EXTRA_DIST += \
-   shell-completion/systemd-zsh-completion.zsh
-
 SOCKETS_TARGET_WANTS += \
systemd-initctl.socket \
systemd-shutdownd.socket
@@ -4351,6 +4352,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
--with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
--with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
+   --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
--with-pamlibdir=$$dc_install_base/$(pamlibdir) \
--with-rootprefix=$$dc_install_base \
--disable-split-usr
diff --git a/configure.ac b/configure.ac
index f71e15c..0ecc716 100644
--- a/configure.ac
+++ b/configure.ac
@@ -915,6 +915,10 @@ AC_ARG_WITH([bashcompletiondir],
 with_bashcompletiondir=${datadir}/bash-completion/completions
 ])])
 
+AC_ARG_WITH([zshcompletiondir],
+AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions 
directory]),
+[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
+
 AC_ARG_WITH([rootprefix],
 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for 
config files and kernel modules]),
 [], [with_rootprefix=${ac_default_prefix}])
@@ -959,6 +963,7 @@ AC_SUBST([dbussessionservicedir], 
[$with_dbussessionservicedir])
 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
 AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
+AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
 AC_SUBST([pamlibdir], [$with_pamlibdir])
 AC_SUBST([rootprefix], [$with_rootprefix])
 AC_SUBST([rootlibdir], [$with_rootlibdir])
@@ -1036,6 +1041,7 @@ AC_MSG_RESULT([
 D-Bus system dir:${with_dbussystemservicedir}
 D-Bus interfaces dir:${with_dbusinterfacedir}
 Bash completions dir:${with_bashcompletiondir}
+Zsh completions dir: ${with_zshcompletiondir}
 Extra start script:  ${RC_LOCAL_SCRIPT_PATH_START}
 Extra stop script:   ${RC_LOCAL_SCRIPT_PATH_STOP}
 Debug shell: ${SUSHELL} @ ${DEBUGTTY}
diff --git a/shell-completion/systemd-zsh-completion.zsh 
b/shell-completion/zsh/_systemd
similarity index 100%
rename from shell-completion/systemd-zsh-completion.zsh
rename to shell-completion/zsh/_systemd
-- 
1.8.4.rc0.352.g531e8cb

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] shell-completion: fix zsh completion installation

2013-07-29 Thread William Giokas
On Mon, Jul 29, 2013 at 04:07:31PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
 On Thu, Jul 25, 2013 at 02:00:06PM -0500, William Giokas wrote:
  Moved zsh shell completion to shell-completion/zsh/_systemd for
  automake's sake. Also allow users to specify where the files should go
  with::
 Makes sense, imho. Should we go one step further and split _systemd
 like the bash completions were split? This would have at least the
 advantage that people packaging a subset of systemd could package
 a subset of completion scripts.

Sorry, replied off list first.

Originally this was there just to have the make install put zsh
completion files in the right place. I would be open to doing this,
however there are quite a few shared functions between commands, and as
I have been told, there isn't really a good way to source or store the
shared functions. I'm still going to try, but I make no promises.

Thanks,
-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpxLMAg4adI5.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] shell-completion: fix zsh completion installation

2013-07-29 Thread William Giokas
On Mon, Jul 29, 2013 at 12:23:54PM -0500, William Giokas wrote:
 On Mon, Jul 29, 2013 at 04:07:31PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
  On Thu, Jul 25, 2013 at 02:00:06PM -0500, William Giokas wrote:
   Moved zsh shell completion to shell-completion/zsh/_systemd for
   automake's sake. Also allow users to specify where the files should go
   with::
  Makes sense, imho. Should we go one step further and split _systemd
  like the bash completions were split? This would have at least the
  advantage that people packaging a subset of systemd could package
  a subset of completion scripts.
 
 Sorry, replied off list first.
 
 Originally this was there just to have the make install put zsh
 completion files in the right place. I would be open to doing this,
 however there are quite a few shared functions between commands, and as
 I have been told, there isn't really a good way to source or store the
 shared functions. I'm still going to try, but I make no promises.

I take back what I just said. All that really stands out is the -H
completion, and that is just a few lines that I don't feel bad about
having in all of the files. Currently I have 13 different files::

_hostnamectl
_journalctl
_localectl
_loginctl
_machinectl
_systemctl
_systemd
_systemd-analyze
_systemd-coredumpctl
_systemd-inhibit
_systemd-nspawn
_timedatectl
_udevadm

with _systemd being the kind of 'fallback' option, containing the
systemd commands that are less complex, and don't require as much in the
way of functions (most simply use 'flag:desc:(a b c)' or some such).

Thanks,
-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpANqVtnodp6.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [GIT PULL] Split out zsh completion into multiple files

2013-07-29 Thread William Giokas
All,

This patch set splits out the zsh completion into 13 distinct files that
are installed separately, similar to the bash completion system. There
is also a final commit that changes the journalctl completion to work
with the new use of -b/--boot. This also replaces all of the previous
unmerged patches I have sent in since the 24th or so. You can pull from
the git:// url specified, or browse the commits here:

  http://git.kaictl.net/wgiokas/systemd.git/



The following changes since commit 4c4ae27d4d314d0dc1c42cd6bfc7b9ae31660885:

  update TODO (2013-07-29 18:43:57 +0200)

are available in the git repository at:

  git://git.kaictl.net/pub/wgiokas/systemd.git zshcomp

for you to fetch changes up to 8f23e6b43ca9bb1b053419a5b8189cdfc7f5e080:

  shell-comp: Fix journalctl's --boot (2013-07-29 14:40:27 -0500)


William Giokas (15):
  shell-completion: fix zsh completion installation
  shell-comp: Split out zsh _systemctl
  shell-comp: Split out zsh _loginctl
  shell-comp: Split out zsh _hostnamectl
  shell-comp: Split out zsh _journalctl
  shell-comp: Split out zsh _localectl
  shell-comp: Split out zsh _coredumpctl
  shell-comp: Split out zsh _timedatectl
  shell-comp: Split out zsh _udevadm
  shell-comp: Split out zsh _systemd-nspawn
  shell-comp: Split out zsh _systemd-inhibit
  shell-comp: Split out zsh _systemd-analyze
  shell-comp: Split out zsh _machinectl
  shell-comp: Remove unused functions
  shell-comp: Fix journalctl's --boot

 Makefile.am |   31 +-
 configure.ac|6 +
 shell-completion/systemd-zsh-completion.zsh | 1102 ---
 shell-completion/zsh/_hostnamectl   |   38 +
 shell-completion/zsh/_journalctl|   92 +++
 shell-completion/zsh/_localectl |   89 +++
 shell-completion/zsh/_loginctl  |  112 +++
 shell-completion/zsh/_machinectl|   47 ++
 shell-completion/zsh/_systemctl |  340 +
 shell-completion/zsh/_systemd   |  107 +++
 shell-completion/zsh/_systemd-analyze   |   26 +
 shell-completion/zsh/_systemd-coredumpctl   |   34 +
 shell-completion/zsh/_systemd-inhibit   |   27 +
 shell-completion/zsh/_systemd-nspawn|   24 +
 shell-completion/zsh/_timedatectl   |   71 ++
 shell-completion/zsh/_udevadm   |  141 
 16 files changed, 1184 insertions(+), 1103 deletions(-)
 delete mode 100644 shell-completion/systemd-zsh-completion.zsh
 create mode 100644 shell-completion/zsh/_hostnamectl
 create mode 100644 shell-completion/zsh/_journalctl
 create mode 100644 shell-completion/zsh/_localectl
 create mode 100644 shell-completion/zsh/_loginctl
 create mode 100644 shell-completion/zsh/_machinectl
 create mode 100644 shell-completion/zsh/_systemctl
 create mode 100644 shell-completion/zsh/_systemd
 create mode 100644 shell-completion/zsh/_systemd-analyze
 create mode 100644 shell-completion/zsh/_systemd-coredumpctl
 create mode 100644 shell-completion/zsh/_systemd-inhibit
 create mode 100644 shell-completion/zsh/_systemd-nspawn
 create mode 100644 shell-completion/zsh/_timedatectl
 create mode 100644 shell-completion/zsh/_udevadm

-- 
Thanks,
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpltWQjBb7fb.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] shell-completion: fix zsh completion installation

2013-07-29 Thread William Giokas
On Mon, Jul 29, 2013 at 04:07:31PM +0200, Zbigniew Jędrzejewski-Szmek wrote:
 On Thu, Jul 25, 2013 at 02:00:06PM -0500, William Giokas wrote:
  Moved zsh shell completion to shell-completion/zsh/_systemd for
  automake's sake. Also allow users to specify where the files should go
  with::
 Makes sense, imho. Should we go one step further and split _systemd
 like the bash completions were split? This would have at least the
 advantage that people packaging a subset of systemd could package
 a subset of completion scripts.

Please refer to the git pull request I sent in:

http://lists.freedesktop.org/archives/systemd-devel/2013-July/012387.html

-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpUbx2qKr1PC.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [GIT PULL v2] Split out zsh completion into multiple files

2013-07-29 Thread William Giokas
On Mon, Jul 29, 2013 at 02:53:17PM -0500, William Giokas wrote:
 All,
 
 This patch set splits out the zsh completion into 13 distinct files that
 are installed separately, similar to the bash completion system. There
 is also a final commit that changes the journalctl completion to work
 with the new use of -b/--boot. This also replaces all of the previous
 unmerged patches I have sent in since the 24th or so. You can pull from
 the git:// url specified, or browse the commits here:
 
   http://git.kaictl.net/wgiokas/systemd.git/

Just some small edits to the first commit.

The following changes since commit 4c4ae27d4d314d0dc1c42cd6bfc7b9ae31660885:

  update TODO (2013-07-29 18:43:57 +0200)

are available in the git repository at:

  git://git.kaictl.net/pub/wgiokas/systemd.git zshcomp

for you to fetch changes up to d773c778c50e02d0a9af6ff5e2ebb49c55aef1f6:

  shell-comp: Fix journalctl's --boot (2013-07-29 15:01:07 -0500)


William Giokas (15):
  shell-completion: fix zsh completion installation
  shell-comp: Split out zsh _systemctl
  shell-comp: Split out zsh _loginctl
  shell-comp: Split out zsh _hostnamectl
  shell-comp: Split out zsh _journalctl
  shell-comp: Split out zsh _localectl
  shell-comp: Split out zsh _coredumpctl
  shell-comp: Split out zsh _timedatectl
  shell-comp: Split out zsh _udevadm
  shell-comp: Split out zsh _systemd-nspawn
  shell-comp: Split out zsh _systemd-inhibit
  shell-comp: Split out zsh _systemd-analyze
  shell-comp: Split out zsh _machinectl
  shell-comp: Remove unused functions
  shell-comp: Fix journalctl's --boot

 Makefile.am |   32 +-
 configure.ac|6 +
 shell-completion/systemd-zsh-completion.zsh | 1102 ---
 shell-completion/zsh/_hostnamectl   |   38 +
 shell-completion/zsh/_journalctl|   92 +++
 shell-completion/zsh/_localectl |   89 +++
 shell-completion/zsh/_loginctl  |  112 +++
 shell-completion/zsh/_machinectl|   47 ++
 shell-completion/zsh/_systemctl |  340 +
 shell-completion/zsh/_systemd   |  107 +++
 shell-completion/zsh/_systemd-analyze   |   26 +
 shell-completion/zsh/_systemd-coredumpctl   |   34 +
 shell-completion/zsh/_systemd-inhibit   |   27 +
 shell-completion/zsh/_systemd-nspawn|   24 +
 shell-completion/zsh/_timedatectl   |   71 ++
 shell-completion/zsh/_udevadm   |  141 
 16 files changed, 1183 insertions(+), 1105 deletions(-)
 delete mode 100644 shell-completion/systemd-zsh-completion.zsh
 create mode 100644 shell-completion/zsh/_hostnamectl
 create mode 100644 shell-completion/zsh/_journalctl
 create mode 100644 shell-completion/zsh/_localectl
 create mode 100644 shell-completion/zsh/_loginctl
 create mode 100644 shell-completion/zsh/_machinectl
 create mode 100644 shell-completion/zsh/_systemctl
 create mode 100644 shell-completion/zsh/_systemd
 create mode 100644 shell-completion/zsh/_systemd-analyze
 create mode 100644 shell-completion/zsh/_systemd-coredumpctl
 create mode 100644 shell-completion/zsh/_systemd-inhibit
 create mode 100644 shell-completion/zsh/_systemd-nspawn
 create mode 100644 shell-completion/zsh/_timedatectl
 create mode 100644 shell-completion/zsh/_udevadm

-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgp22psKSBKYv.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [GIT PULL] Split out zsh completion into multiple files

2013-07-29 Thread William Giokas
On Tue, Jul 30, 2013 at 12:05:00AM +0200, Michael Biebl wrote:
 2013/7/29 William Giokas 1007...@gmail.com:
  This patch set splits out the zsh completion into 13 distinct files that
  are installed separately, similar to the bash completion system. There
 
 One of the main reasons why the bash completion was split into
 separate files named after the individual binary, is that
 bash-completion will load the completions on demand this way.
 
 What's the benefit of splitting the zsh completion?

The bash completion was also split so that not all of the completions
were installed if they weren't needed. If you configure systemd without
xyz binary, the _xyz completion will not install, for the most part.

Thanks,
-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpVj6RMTZk2Y.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] shell-completion: fix zsh completion installation

2013-07-25 Thread William Giokas
Moved zsh shell completion to shell-completion/zsh/_systemd for
automake's sake. Also allow users to specify where the files should go
with::

  ./configure --with-zshcompletiondir=/path/to/some/where

and by default going to `$datadir/zsh/site-functions`
---

Honestly, this is my first foray into autotools, hence the simple rename
instead of some logic in the Makefile.am or configure.ac. I also think it
cleans up the shell-completion dir a bit. The 'systemd-zsh-completion.zsh'
name always seemed a bit off compared to the bash names.

 Makefile.am   | 7 ++-
 configure.ac  | 6 ++
 shell-completion/{systemd-zsh-completion.zsh = zsh/_systemd} | 0
 3 files changed, 12 insertions(+), 1 deletion(-)
 rename shell-completion/{systemd-zsh-completion.zsh = zsh/_systemd} (100%)

diff --git a/Makefile.am b/Makefile.am
index 7933de6..4e8a3f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,6 +68,7 @@ pkgconfigdatadir=$(datadir)/pkgconfig
 pkgconfiglibdir=$(libdir)/pkgconfig
 polkitpolicydir=$(datadir)/polkit-1/actions
 bashcompletiondir=@bashcompletiondir@
+zshcompletiondir=@zshcompletiondir@
 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
@@ -342,6 +343,9 @@ dist_bashcompletion_DATA = \
shell-completion/bash/systemd-analyze \
shell-completion/bash/udevadm
 
+dist_zshcompletion_DATA = \
+   shell-completion/zsh/_systemd
+
 dist_sysctl_DATA = \
sysctl.d/50-default.conf
 
@@ -4238,7 +4242,7 @@ EXTRA_DIST += \
docs/var-log/README.in
 
 EXTRA_DIST += \
-   shell-completion/systemd-zsh-completion.zsh
+   shell-completion/zsh/_systemd
 
 SOCKETS_TARGET_WANTS += \
systemd-initctl.socket \
@@ -4354,6 +4358,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
--with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
--with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
+   --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
--with-pamlibdir=$$dc_install_base/$(pamlibdir) \
--with-rootprefix=$$dc_install_base \
--disable-split-usr
diff --git a/configure.ac b/configure.ac
index 759073a..3028028 100644
--- a/configure.ac
+++ b/configure.ac
@@ -911,6 +911,10 @@ AC_ARG_WITH([bashcompletiondir],
 with_bashcompletiondir=${datadir}/bash-completion/completions
 ])])
 
+AC_ARG_WITH([zshcompletiondir],
+AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions 
directory]),
+[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
+
 AC_ARG_WITH([rootprefix],
 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for 
config files and kernel modules]),
 [], [with_rootprefix=${ac_default_prefix}])
@@ -955,6 +959,7 @@ AC_SUBST([dbussessionservicedir], 
[$with_dbussessionservicedir])
 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
 AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
+AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
 AC_SUBST([pamlibdir], [$with_pamlibdir])
 AC_SUBST([rootprefix], [$with_rootprefix])
 AC_SUBST([rootlibdir], [$with_rootlibdir])
@@ -1032,6 +1037,7 @@ AC_MSG_RESULT([
 D-Bus system dir:${with_dbussystemservicedir}
 D-Bus interfaces dir:${with_dbusinterfacedir}
 Bash completions dir:${with_bashcompletiondir}
+Zsh completions dir: ${with_zshcompletiondir}
 Extra start script:  ${RC_LOCAL_SCRIPT_PATH_START}
 Extra stop script:   ${RC_LOCAL_SCRIPT_PATH_STOP}
 Debug shell: ${SUSHELL} @ ${DEBUGTTY}
diff --git a/shell-completion/systemd-zsh-completion.zsh 
b/shell-completion/zsh/_systemd
similarity index 100%
rename from shell-completion/systemd-zsh-completion.zsh
rename to shell-completion/zsh/_systemd
-- 
1.8.3.4.1180.ge27c933

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH v2] shell-completion: fix zsh completion installation

2013-07-25 Thread William Giokas
Moved zsh shell completion to shell-completion/zsh/_systemd for
automake's sake. Also allow users to specify where the files should go
with::

  ./configure --with-zshcompletiondir=/path/to/some/where

and by default going to `$datadir/zsh/vendor-functions`
---
 Makefile.am   | 7 ++-
 configure.ac  | 6 ++
 shell-completion/{systemd-zsh-completion.zsh = zsh/_systemd} | 0
 3 files changed, 12 insertions(+), 1 deletion(-)
 rename shell-completion/{systemd-zsh-completion.zsh = zsh/_systemd} (100%)

diff --git a/Makefile.am b/Makefile.am
index 7933de6..4e8a3f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,6 +68,7 @@ pkgconfigdatadir=$(datadir)/pkgconfig
 pkgconfiglibdir=$(libdir)/pkgconfig
 polkitpolicydir=$(datadir)/polkit-1/actions
 bashcompletiondir=@bashcompletiondir@
+zshcompletiondir=@zshcompletiondir@
 rpmmacrosdir=$(prefix)/lib/rpm/macros.d
 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
 sysvrcnddir=$(SYSTEM_SYSVRCND_PATH)
@@ -342,6 +343,9 @@ dist_bashcompletion_DATA = \
shell-completion/bash/systemd-analyze \
shell-completion/bash/udevadm
 
+dist_zshcompletion_DATA = \
+   shell-completion/zsh/_systemd
+
 dist_sysctl_DATA = \
sysctl.d/50-default.conf
 
@@ -4238,7 +4242,7 @@ EXTRA_DIST += \
docs/var-log/README.in
 
 EXTRA_DIST += \
-   shell-completion/systemd-zsh-completion.zsh
+   shell-completion/zsh/_systemd
 
 SOCKETS_TARGET_WANTS += \
systemd-initctl.socket \
@@ -4354,6 +4358,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
--with-dbusinterfacedir=$$dc_install_base/$(dbusinterfacedir) \
--with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) \
+   --with-zshcompletiondir=$$dc_install_base/$(zshcompletiondir) \
--with-pamlibdir=$$dc_install_base/$(pamlibdir) \
--with-rootprefix=$$dc_install_base \
--disable-split-usr
diff --git a/configure.ac b/configure.ac
index 759073a..a7e03b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -911,6 +911,10 @@ AC_ARG_WITH([bashcompletiondir],
 with_bashcompletiondir=${datadir}/bash-completion/completions
 ])])
 
+AC_ARG_WITH([zshcompletiondir],
+AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions 
directory]),
+[], [with_zshcompletiondir=${datadir}/zsh/vendor-functions])
+
 AC_ARG_WITH([rootprefix],
 AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for 
config files and kernel modules]),
 [], [with_rootprefix=${ac_default_prefix}])
@@ -955,6 +959,7 @@ AC_SUBST([dbussessionservicedir], 
[$with_dbussessionservicedir])
 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
 AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
+AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
 AC_SUBST([pamlibdir], [$with_pamlibdir])
 AC_SUBST([rootprefix], [$with_rootprefix])
 AC_SUBST([rootlibdir], [$with_rootlibdir])
@@ -1032,6 +1037,7 @@ AC_MSG_RESULT([
 D-Bus system dir:${with_dbussystemservicedir}
 D-Bus interfaces dir:${with_dbusinterfacedir}
 Bash completions dir:${with_bashcompletiondir}
+Zsh completions dir: ${with_zshcompletiondir}
 Extra start script:  ${RC_LOCAL_SCRIPT_PATH_START}
 Extra stop script:   ${RC_LOCAL_SCRIPT_PATH_STOP}
 Debug shell: ${SUSHELL} @ ${DEBUGTTY}
diff --git a/shell-completion/systemd-zsh-completion.zsh 
b/shell-completion/zsh/_systemd
similarity index 100%
rename from shell-completion/systemd-zsh-completion.zsh
rename to shell-completion/zsh/_systemd
-- 
1.8.3.4.1180.ge27c933

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH v2] shell-completion: fix zsh completion installation

2013-07-25 Thread William Giokas
On Fri, Jul 26, 2013 at 12:41:11AM +0200, Michael Biebl wrote:
 I was told [1], the directory for 3rd party packages would be
 /usr/share/zsh/vendor-completions. But I'm not a zsh user, so I'm just
 paroting what I read there.

Was there a zsh developer (not a Debian packager of zsh) that says this
is where things should go? Not that I want to go against Debian, but
I don't want to just do what Debian says, I would rather do what the zsh
developers so. You can specify a directory for this, so if a distro
wants it in a separate place, they can do that.

On Thu, Jul 25, 2013 at 06:25:03PM -0500, William Giokas wrote:
 Moved zsh shell completion to shell-completion/zsh/_systemd for
 automake's sake. Also allow users to specify where the files should go
 with::
 
   ./configure --with-zshcompletiondir=/path/to/some/where
 
 and by default going to `$datadir/zsh/vendor-functions`

Please disregard this until things are worked out.

Thanks,
-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgphvRWWPH7md.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH v2] shell-completion: fix zsh completion installation

2013-07-25 Thread William Giokas
On Thu, Jul 25, 2013 at 07:02:14PM -0500, William Giokas wrote:
 On Fri, Jul 26, 2013 at 12:41:11AM +0200, Michael Biebl wrote:
  I was told [1], the directory for 3rd party packages would be
  /usr/share/zsh/vendor-completions. But I'm not a zsh user, so I'm just
  paroting what I read there.
 
 Was there a zsh developer (not a Debian packager of zsh) that says this
 is where things should go? Not that I want to go against Debian, but
 I don't want to just do what Debian says, I would rather do what the zsh
 developers so. You can specify a directory for this, so if a distro
 wants it in a separate place, they can do that.

Just looking at what Fedora/CentOS and Arch provide, nothing installs to
'/usr/share/zsh/vendor-functions/'. I'm going to say to disregard the v2
and go with the v1 patch. If Debian wants to put it somewhere special,
they can use the configure flag.

Thanks,
-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpfgaqYVIvFe.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd service file type

2013-07-24 Thread William Giokas
On Wed, Jul 24, 2013 at 12:21:00PM +0500, Muhammad Shakeel wrote:
 Hi all,
 
 Is there any limitation on file types which can act as a valid unit
 file for systemd? I have seen .socket, .mount, .path and of-course
 .service.
 
 Or any file with valid syntax can act as a systemd unit file?

No, each suffix you mentioned above has a specific usage and type. If
you look at systemd.unit(5) you can see most of the unit types and what
they do.

http://www.freedesktop.org/software/systemd/man/systemd.unit.html

Thanks,
-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpvpAm37wQsn.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH v3] shell-completion: Add new journalctl options

2013-07-24 Thread William Giokas
New options:

* -e, --pager-end
* -r, --reverse
* -x, --catalog
* -k, --dmesg
* --after-cursor
* --file
* --root
* --dump-catalog
* --force

Modified options:

* --this-boot - --boot=

Also reorganized the options to match the manual page, similar to
systemctl.
---

Using --boot now completes to something like this:
wgiokas@wst420:~/git/systemd % journalctl --boot=tab
 boot offsets
-1  -2  -3  -4  -5  -6  -7  
-8
 boot ids
044c72e6535d43a1a69c326c983f8db3  4e16c6cd6ece413d9ef2726592f2e3a5  
e98663898e144e68a469ff8f595fe161
3dfaadf1e1724d37baf494eef1ec8926  7e776bf9c11e474c9c556c59e8ddc4fc  
ee89bf9326c445a49c5d9314733489f8
48470a7aa0984274b00837015efe799c  e6e83fd5e4ee4dfab0589a5214d9fbd0

 shell-completion/systemd-zsh-completion.zsh | 55 +++--
 1 file changed, 36 insertions(+), 19 deletions(-)

diff --git a/shell-completion/systemd-zsh-completion.zsh 
b/shell-completion/systemd-zsh-completion.zsh
index e26bba2..55fcabc 100644
--- a/shell-completion/systemd-zsh-completion.zsh
+++ b/shell-completion/systemd-zsh-completion.zsh
@@ -73,37 +73,46 @@ _ctls()
 ;;
 journalctl)
 _arguments -s \
-'--since=[Start showing entries newer or of the specified 
date]:-MM-DD HH\:MM\:SS' \
-'--until=[Stop showing entries older or of the specified 
date]:-MM-DD HH\:MM\:SS' \
-{-c,--cursor=}'[Start showing entries from specified 
cursor]:cursors:_journal_fields __CURSORS' \
-'--system[Show system and kernel messages]' \
-'--user[Show messages from user services]' \
-{-b,--this-boot}'[Show data only from current boot]' \
-{-u,--unit=}'[Show data only from the specified 
unit]:units:_journal_fields _SYSTEMD_UNIT' \
-'--user-unit[Show data only from the specified user session 
unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \
-{-p,--priority=}'[Show only messages within the specified 
priority range]:priority:_journal_fields PRIORITY' \
+{-h,--help}'[Show this help]' \
+'--version[Show package version]' \
+'--no-pager[Do not pipe output into a pager]' \
+{-l,--full}'[Show long fields in full]' \
+{-a,--all}'[Show all fields, including long and unprintable]' \
 {-f,--follow}'[Follow journal]' \
+{-e,--pager-end}'[Jump to the end of the journal in the 
pager]' \
 {-n,--lines=}'[Number of journal entries to show]:integer' \
 '--no-tail[Show all lines, even in follow mode]' \
+{-r,--reverse}'[Reverse output]' \
 {-o,--output=}'[Change journal output mode]:output 
modes:_outputmodes' \
-{-l,--full}'[Show long fields in full]' \
-{-a,--all}'[Show all fields, including long and unprintable]' \
+{-x,--catalog}'[Show explanatory texts with each log line]' \
 {-q,--quiet}[Don't show privilege warning] \
-'--no-pager[Do not pipe output into a pager]' \
 {-m,--merge}'[Show entries from all available journals]' \
+{-b,--boot=}'[Show data only from the specified boot or 
offset]:boot id or offset:_journal_boots' \
+{-k,--dmesg}'[Show only kernel messages, Implies -b]' \
+{-u,--unit=}'[Show data only from the specified 
unit]:units:_journal_fields _SYSTEMD_UNIT' \
+'--user-unit[Show data only from the specified user session 
unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \
+{-p,--priority=}'[Show only messages within the specified 
priority range]:priority:_journal_fields PRIORITY' \
+{-c,--cursor=}'[Start showing entries from specified 
cursor]:cursors:_journal_fields __CURSORS' \
+'--after-cursor=[Start showing entries from the location in 
the journal after the cursor]:cursors:_journal_fields __CURSORS' \
+'--since=[Start showing entries newer or of the specified 
date]:-MM-DD HH\:MM\:SS' \
+'--until=[Stop showing entries older or of the specified 
date]:-MM-DD HH\:MM\:SS' \
+{-F,--field=}'[List all values a certain field 
takes]:Fields:_list_fields' \
+'--system[Show system and kernel messages]' \
+'--user[Show messages from user services]' \
 {-D,--directory=}'[Show journal files from 
directory]:directories:_directories' \
-'--interval=[Time interval for changing the FSS sealing 
key]:time interval' \
-'--verify-key=[Specify FSS verification key]:FSS key' \
-{-h,--help}'[Show this help]' \
-'--version[Show package version]' \
+'--file=[Operate on specified journal files]:file:_files' \
+'--root=[Operate on 

[systemd-devel] [PATCH 1/2] shell-completion: Add new flags, rearrange flags

2013-07-23 Thread William Giokas
Added a few flags:

* --state=
* --irreversible
* --show-type
* -i, --ignore-inhibitors
* --plain

Also arranged the flags as they are in the manual page. This way, as new
options are added they can more easily be added to the zsh completion as
well.
---

I can always put the order back, but this makes sense.

 shell-completion/systemd-zsh-completion.zsh | 19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/shell-completion/systemd-zsh-completion.zsh 
b/shell-completion/systemd-zsh-completion.zsh
index c85e00e..e26bba2 100644
--- a/shell-completion/systemd-zsh-completion.zsh
+++ b/shell-completion/systemd-zsh-completion.zsh
@@ -10,6 +10,7 @@ _ctls()
 {-h,--help}'[Show help]' \
 '--version[Show package version]' \
 {-t,--type=}'[List only units of a particular type]:unit 
type:(automount device mount path service snapshot socket swap target timer)' \
+'--state=[Display units in the specifyied state]:unit 
state:(loaded failed active inactive not-found listening running waiting 
plugged mounted exited dead masked)' \
 \*{-p,--property=}'[Show only properties by specific 
name]:unit property' \
 {-a,--all}'[Show all units/properties, including dead/empty 
ones]' \
 '--reverse[Show reverse dependencies]' \
@@ -18,26 +19,30 @@ _ctls()
 '--failed[Show only failed units]' \
 {-l,--full}[Don't ellipsize unit names on output] \
 '--fail[When queueing a new job, fail if conflicting jobs are 
pending]' \
+'--show-types[When showing sockets, show socket type]' \
+'--irreversible[Mark transactions as irreversible]' \
 '--ignore-dependencies[When queueing a new job, ignore all its 
dependencies]' \
-'--kill-who=[Who to send signal to]:killwho:(main control 
all)' \
-{-s,--signal=}'[Which signal to send]:signal:_signals' \
-{-H,--host=}'[Show information for remote 
host]:userathost:_hosts_or_user_at_host' \
-{-P,--privileged}'[Acquire privileges before execution]' \
+{-i,--ignore-inhibitors}'[When executing a job, ignore jobs 
dependencies]' \
 {-q,--quiet}'[Suppress output]' \
 '--no-block[Do not wait until operation finished]' \
---no-wall[Don't send wall message before 
halt/power-off/reboot] \
---no-reload[When enabling/disabling unit files, don't reload 
daemon configuration] \
 '--no-legend[Do not print a legend, i.e. the column headers 
and the footer with hints]' \
 '--no-pager[Do not pipe output into a pager]' \
-'--no-ask-password[Do not ask for system passwords]' \
 '--system[Connect to system manager]' \
 '--user[Connect to user service manager]' \
+--no-wall[Don't send wall message before 
halt/power-off/reboot] \
 '--global[Enable/disable unit files globally]' \
+--no-reload[When enabling/disabling unit files, don't reload 
daemon configuration] \
+'--no-ask-password[Do not ask for system passwords]' \
+'--kill-who=[Who to send signal to]:killwho:(main control 
all)' \
+{-s,--signal=}'[Which signal to send]:signal:_signals' \
 {-f,--force}'[When enabling unit files, override existing 
symlinks. When shutting down, execute action immediately]' \
 '--root=[Enable unit files in the specified root 
directory]:directory:_directories' \
 '--runtime[Enable unit files only temporarily until next 
reboot]' \
+{-H,--host=}'[Show information for remote 
host]:userathost:_hosts_or_user_at_host' \
+{-P,--privileged}'[Acquire privileges before execution]' \
 {-n,--lines=}'[Journal entries to show]:number of entries' \
 {-o,--output=}'[Change journal output 
mode]:modes:_outputmodes' \
+'--plain[When used with list-dependencies, print output as a 
list]' \
 '*::systemctl command:_systemctl_command'
 ;;
 loginctl)
-- 
1.8.3.2.1052.g3a6d627

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 2/2] man: Small grammar fix

2013-07-23 Thread William Giokas
'... or ... or ...' should be '..., ... or ...'
---
 man/systemctl.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/systemctl.xml b/man/systemctl.xml
index ee13a70..0a90202 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -111,8 +111,8 @@ along with systemd; If not, see 
http://www.gnu.org/licenses/.
 termoption--state=/option/term
 
 listitem
-paraThe argument should be a comma-separated list of unit LOAD
-or SUB or ACTIVE states. When listing units, show only those
+paraThe argument should be a comma-separated list of unit LOAD,
+SUB or ACTIVE states. When listing units, show only those
 with specified LOAD or SUB or ACTIVE state./para
 /listitem
   /varlistentry
-- 
1.8.3.2.1052.g3a6d627

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 1/2] shell-completion: Add new flags, rearrange flags

2013-07-23 Thread William Giokas
On Tue, Jul 23, 2013 at 09:41:44AM -0500, William Giokas wrote:
 +'--state=[Display units in the specifyied state]:unit 
 state:(loaded failed active inactive not-found listening running waiting 
 plugged mounted exited dead masked)' \

I'm probably missing things here. If there's anything missing, I'll be
glad to add it, but these are all of the states that I get from running
systemctl at the moment.

Thanks,
-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpIV4fCFfBAp.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] shell-completion: Add machinectl zsh completion

2013-07-23 Thread William Giokas
---
 shell-completion/systemd-zsh-completion.zsh | 49 -
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/shell-completion/systemd-zsh-completion.zsh 
b/shell-completion/systemd-zsh-completion.zsh
index c85e00e..6415be7 100644
--- a/shell-completion/systemd-zsh-completion.zsh
+++ b/shell-completion/systemd-zsh-completion.zsh
@@ -1,4 +1,4 @@
-#compdef systemctl loginctl journalctl hostnamectl localectl timedatectl 
systemd-coredumpctl udevadm systemd-analyze systemd-cat systemd-ask-password 
systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent
+#compdef systemctl loginctl journalctl hostnamectl localectl timedatectl 
systemd-coredumpctl udevadm systemd-analyze systemd-cat systemd-ask-password 
systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
 
 _ctls()
 {
@@ -263,6 +263,21 @@ _ctls()
 '--plymouth[Ask question with plymouth(8).]' \
 '--console[Ask question on /dev/console.]'
 ;;
+machinectl)
+_arguments \
+{-h,--help}'[Prints a short help text and exits.]' \
+'--version[Prints a short version string and exits.]' \
+{-p,--property}'[Limit output to specified 
property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader 
Class State RootDirectory)' \
+{-a,--all}'[Show all proerties]' \
+(-l,--full)'[Do not ellipsize cgroup members]' \
+'--no-pager[Do not pipe output into a pager]' \
+'--no-ask-password[Do not ask for system passwords]' \
+'--kill-who=[Who to send signal to]:killwho:(leader all)' \
+{-s,--signal=}'[Which signal to send]:signal:_signals' \
+{-H,--host=}'[Show information for remote 
host]:userathost:_hosts_or_user_at_host' \
+{-P,--privileged}'[Acquire privileges before execution]' \
+'*::machinectl command:_machinectl_command'
+;;
 *) _message 'eh?' ;;
 esac
 }
@@ -916,6 +931,38 @@ _systemd-coredumpctl_command(){
 
 }
 
+(( $+functions[_machinectl_command] )) || _machinectl_command()
+{
+  local -a _machinectl_cmds
+  _machinectl_cmds=(
+list:List currently running VMs/containers
+status:Show VM/container status
+show:Show properties of one or more VMs/containers
+terminate:Terminate one or more VMs/containers
+kill:Send signal to process or a VM/container
+  )
+  if (( CURRENT == 1 )); then
+_describe -t commands 'machinectl command' _machinectl_cmds || compadd $@
+  else
+local curcontext=$curcontext
+cmd=${${_machinectl_cmds[(r)$words[1]:*]%%:*}}
+if (( $#cmd )); then
+  case $cmd in
+list) msg=no options ;;
+*)
+  _machines=( ${(foa)$(machinectl list | awk '{print $1}')} )
+  if [[ -n $_machines ]]; then
+_describe 'machines' _machines
+  else
+_message 'no machines'
+  fi
+  esac
+else
+  _message no more options
+fi
+  fi
+}
+
 _udevadm_info(){
 _arguments \
 '--query=[Query the database for specified type of device data. It 
needs the --path or --name to identify the specified device.]:type:(name 
symlink path property all)' \
-- 
1.8.3.4.1180.ge27c933

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH v2] shell-completion: Add machinectl zsh completion

2013-07-23 Thread William Giokas
---

Add optional '=' to --property

 shell-completion/systemd-zsh-completion.zsh | 49 -
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/shell-completion/systemd-zsh-completion.zsh 
b/shell-completion/systemd-zsh-completion.zsh
index c85e00e..b62b6df 100644
--- a/shell-completion/systemd-zsh-completion.zsh
+++ b/shell-completion/systemd-zsh-completion.zsh
@@ -1,4 +1,4 @@
-#compdef systemctl loginctl journalctl hostnamectl localectl timedatectl 
systemd-coredumpctl udevadm systemd-analyze systemd-cat systemd-ask-password 
systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent
+#compdef systemctl loginctl journalctl hostnamectl localectl timedatectl 
systemd-coredumpctl udevadm systemd-analyze systemd-cat systemd-ask-password 
systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-inhibit 
systemd-machine-id-setup systemd-notify systemd-nspawn systemd-tmpfiles 
systemd-tty-ask-password-agent machinectl
 
 _ctls()
 {
@@ -263,6 +263,21 @@ _ctls()
 '--plymouth[Ask question with plymouth(8).]' \
 '--console[Ask question on /dev/console.]'
 ;;
+machinectl)
+_arguments \
+{-h,--help}'[Prints a short help text and exits.]' \
+'--version[Prints a short version string and exits.]' \
+{-p,--property=}'[Limit output to specified 
property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader 
Class State RootDirectory)' \
+{-a,--all}'[Show all proerties]' \
+(-l,--full)'[Do not ellipsize cgroup members]' \
+'--no-pager[Do not pipe output into a pager]' \
+'--no-ask-password[Do not ask for system passwords]' \
+'--kill-who=[Who to send signal to]:killwho:(leader all)' \
+{-s,--signal=}'[Which signal to send]:signal:_signals' \
+{-H,--host=}'[Show information for remote 
host]:userathost:_hosts_or_user_at_host' \
+{-P,--privileged}'[Acquire privileges before execution]' \
+'*::machinectl command:_machinectl_command'
+;;
 *) _message 'eh?' ;;
 esac
 }
@@ -916,6 +931,38 @@ _systemd-coredumpctl_command(){
 
 }
 
+(( $+functions[_machinectl_command] )) || _machinectl_command()
+{
+  local -a _machinectl_cmds
+  _machinectl_cmds=(
+list:List currently running VMs/containers
+status:Show VM/container status
+show:Show properties of one or more VMs/containers
+terminate:Terminate one or more VMs/containers
+kill:Send signal to process or a VM/container
+  )
+  if (( CURRENT == 1 )); then
+_describe -t commands 'machinectl command' _machinectl_cmds || compadd $@
+  else
+local curcontext=$curcontext
+cmd=${${_machinectl_cmds[(r)$words[1]:*]%%:*}}
+if (( $#cmd )); then
+  case $cmd in
+list) msg=no options ;;
+*)
+  _machines=( ${(foa)$(machinectl list | awk '{print $1}')} )
+  if [[ -n $_machines ]]; then
+_describe 'machines' _machines
+  else
+_message 'no machines'
+  fi
+  esac
+else
+  _message no more options
+fi
+  fi
+}
+
 _udevadm_info(){
 _arguments \
 '--query=[Query the database for specified type of device data. It 
needs the --path or --name to identify the specified device.]:type:(name 
symlink path property all)' \
-- 
1.8.3.4.1180.ge27c933

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] po: add dbus-scope.c to POTFILES.skip

2013-07-03 Thread William Giokas
---

This has been bothering me for way too long. This should be caught when
make check is run, and things shouldn't make it past the CI service till it
actually passes make check. This even managed to make it to the systemd 205
release version.

 po/POTFILES.skip | 1 +
 1 file changed, 1 insertion(+)

diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 65327aa..b552029 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -12,6 +12,7 @@ src/core/dbus-swap.c
 src/core/dbus-target.c
 src/core/dbus-timer.c
 src/core/dbus-unit.c
+src/core/dbus-scope.c
 src/hostname/hostnamed.c
 src/locale/localed.c
 src/core/org.freedesktop.systemd1.policy.in
-- 
1.8.3.2.844.g177f491

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Broken build and CI strategy

2013-07-02 Thread William Giokas
On Fri, Jun 28, 2013 at 09:18:24AM +0200, Holger Hans Peter Freyther wrote:
 On Fri, Jun 28, 2013 at 09:05:40AM +0200, Peter Sztanojev wrote:
  there already is a jenkins ci for systemd kindly provided by Pantheon:
  http://systemd.getpantheon.com:8080/jenkins/
 
 The jenkins script is still using make test (which is like calling
 make /tmp), to execute the tests one would need to call make check
 but we already had this and it wasn't changed...

Okay, there needs to be something done about this ASAP. I have now twice
gone to build a package, then run 'make check', and it has failed for
simple reasons like translations missing or not being in the right
places. These should be caught by jenkins and reported to the IRC
channel. I realize that some files have been added recently, but they
need to be fully added, not just thrown into the pot (pun not intended).

Thanks,

-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpP6CNqB8Xht.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [ANNOUNCE] systemd 199

2013-03-27 Thread William Giokas
On Tue, Mar 26, 2013 at 05:40:59PM +0100, Philip Müller wrote:
 systemd-199 build just fine on 64bit, but on 32bit it fails during check:
 
 PASS: test-sleep
 ./build-aux/test-driver: line 95: 18318 Segmentation fault (core
 dumped) $@  $log_file 21

Fixed as of 49e5de64e22ea4794092b91393545ab08e658e0a for me.

-- 
William Giokas | KaiSforza
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpJIoQMrYvOr.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [ANNOUNCE] systemd 199

2013-03-26 Thread William Giokas
On Tue, Mar 26, 2013 at 06:32:38PM +0100, Lennart Poettering wrote:
 On Tue, 26.03.13 10:06, Shawn (shawnland...@gmail.com) wrote:
 
  you could get a backtrace in gdb
 
 Yes, please provide a backtrace for this!
 
I just ran a git bisect on this issue, and it's been happening on my
system since v198, though I hadn't really run make check at all.

  # bad: [ab17a050b778412b11c82f4fa974be9c491ead36] core: if we cannot 
JOB_ISOLATE the default target JOB_REPLACE it instead
  # good: [dee4c244254bb49d1ffa8bd7171ae9cce596d2d0] build-sys: fix spelling of 
sysvrcndir
  git bisect start 'v198' 'v197'
  # bad: [2a2473d89e02ccd923abc6e74cddd07798679a15] boot: add stub Makefile 
symlink
  git bisect bad 2a2473d89e02ccd923abc6e74cddd07798679a15
  # good: [c3e31c7ba1d29c9b967035a6d697820114e1c087] Replace autoconf int max 
test with simple define
  git bisect good c3e31c7ba1d29c9b967035a6d697820114e1c087
  # bad: [682cfdff697707dbe29c9c1907a7c8c452ffb397] test-strv.c: test strv_join 
added
  git bisect bad 682cfdff697707dbe29c9c1907a7c8c452ffb397
  # good: [ccc9a4f9ffdab069b0b785627c48962fdadf6d46] man: extend 
systemd.directives(7) to all manual pages
  git bisect good ccc9a4f9ffdab069b0b785627c48962fdadf6d46
  # good: [d9e5e694ea7841045975426163c96fc9f71e6f7d] install: automatic cleanup 
using local cleanup functions
  git bisect good d9e5e694ea7841045975426163c96fc9f71e6f7d
  # skip: [38936e3cfaa9c813fe778448de49996429687ad5] build-sys: inline two 
definitions which were only used in one place
  git bisect skip 38936e3cfaa9c813fe778448de49996429687ad5
  # bad: [2a4b7e7bf2465112415907eef238c786ea145b06] build-sys: fix empty lines
  git bisect bad 2a4b7e7bf2465112415907eef238c786ea145b06
  # skip: [652e737517bbbae692923246aeb687e2d1f314ef] build-sys: keep 
intermediate files
  git bisect skip 652e737517bbbae692923246aeb687e2d1f314ef
  # bad: [4584651afd7c1ddb30a2bd16a08088969e4bccff] build-sys: add intermediate 
files to CLEANFILES to fix distcheck
  git bisect bad 4584651afd7c1ddb30a2bd16a08088969e4bccff
  # bad: [1682ff60114b7a57972a03aa99f9864064593f72] tests: add test for unit 
name printing
  git bisect bad 1682ff60114b7a57972a03aa99f9864064593f72
  # good: [3f0b2f0f452e9e4fb7b62030ea05738bb1b6] install: allow %u an and 
%U specifiers in WantedBy/RequiredBy/Alias
  git bisect good 3f0b2f0f452e9e4fb7b62030ea05738bb1b6
  # good: [3251c0d2392062b2b8354793a2037d1161f824ee] tests: compress unit name 
tests and add more asserts
  git bisect good 3251c0d2392062b2b8354793a2037d1161f824ee

It ened by blaming this commit:

  [2a2473d89e02ccd923abc6e74cddd07798679a15] boot: add stub Makefile symlink
  1682ff60114b7a57972a03aa99f9864064593f72 is the first bad commit
  commit 1682ff60114b7a57972a03aa99f9864064593f72
  Author: Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl
  Date:   Tue Jan 29 15:25:36 2013 -0500

  tests: add test for unit name printing

  :100644 100644 c44ca0b76d53f8151e669ec4f8fa8dbf385ecba5
f0149310330408ced1e5e212bc5ef3684e3395da M  Makefile.am
  :04 04 389f403c2b93728e572bbc45f52803d5ed50225f
8d6a4318a1637cf7cc2f19605ca54f669891eef7 M  src

Thanks,
-- 
William Giokas | KaiSforza
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF


pgpprNibdLGuO.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] man: Add reason for disk model info not working

2013-02-17 Thread William Giokas
In systemd-bootchart, the disk model information will not be found
unless the root device is specified using `root=/dev/sdxY` on the kernel
line. Just add a note as to why this doesn't happen.
---
 man/systemd-bootchart.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml
index f87f821..d690ed3 100644
--- a/man/systemd-bootchart.xml
+++ b/man/systemd-bootchart.xml
@@ -259,6 +259,10 @@
 
 refsect1
 titleBugs/title
+parasystemd-bootchart does not get the model information for 
the hard drive
+unless the root device is specified with 
coderoot=/dev/sdxY/code. Using
+UUIDs or PARTUUIDs will boot fine, but the hard drive model 
will not be
+added to the chart./para
 paraFor bugs, please contact the author or current 
maintainer:/para
 varlistentry
 termAuke Kok/term
-- 
1.8.1.3.605.g02339dd

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCHv2] man: Add reason for disk model info not working

2013-02-16 Thread William Giokas
In systemd-bootchart, the disk model information will not be found
unless the root device is specified using `root=/dev/sdxY` on the kernel
line. Just add a note as to why this doesn't happen.
---

Sorry, forgot to pull. Rebased.

 man/systemd-bootchart.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml
index a4770fc..9067d65 100644
--- a/man/systemd-bootchart.xml
+++ b/man/systemd-bootchart.xml
@@ -300,6 +300,10 @@
 
 refsect1
 titleBugs/title
+parasystemd-bootchart does not get the model information for 
the hard drive
+unless the root device is specified with 
coderoot=/dev/sdxY/code. Using
+UUIDs or PARTUUIDs will boot fine, but the hard drive model 
will not be
+added to the chart./para
 paraFor bugs, please contact the author and current 
maintainer:/para
 simplelist
 memberAuke Kok 
emailauke-jan.h@intel.com/email/member
-- 
1.8.1.3.605.g02339dd

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] man: Update bootchart.conf(5)

2013-02-14 Thread William Giokas
Recent changes in config options makes almost eveny variable in the man
page obsolete.
---
 man/bootchart.conf.xml | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/man/bootchart.conf.xml b/man/bootchart.conf.xml
index fb6e274..1e440eb 100644
--- a/man/bootchart.conf.xml
+++ b/man/bootchart.conf.xml
@@ -70,14 +70,14 @@
 variablelist class='bootchart-directives'
 
 varlistentry
-termvarnamesamples=500/varname/term
+termvarnameSamples=500/varname/term
 listitemparaConfigure the amount of 
samples to
 record total before bootchart exits. Each 
sample will
-record at intervals defined by 
freq=./para/listitem
+record at intervals defined by 
Frequency=./para/listitem
 /varlistentry
 
 varlistentry
-termvarnamefreq=25/varname/term
+termvarnameFrequency=25/varname/term
 listitemparaConfigure the sample log 
frequency.
 This can be a fractional number, but must be 
larger than
 0.0. Most systems can cope with values under 
25-50 without
@@ -85,18 +85,18 @@
 /varlistentry
 
 varlistentry
-termvarnamerel=0/varname/term
+termvarnameRelative=no/varname/term
 listitemparaConfigures whether the left 
axis of the
 output graph equals time=0.0 (CLOCK_MONOTONIC 
start). This
 is useful for using bootchart at post-boot 
time to profile
 an already booted system, otherwise the graph 
would become
-extremely large. If set to a non-zero value, 
the horizontal
-axis starts at the first recorded sample 
instead of time=0.0.
+extremely large. If set to yes, the horizontal 
axis starts
+at the first recorded sample instead of 
time=0.0.
 /para/listitem
 /varlistentry
 
 varlistentry
-termvarnamefilter=0/varname/term
+termvarnameFilter=no/varname/term
 listitemparaConfigures whether the 
resulting graph
 should omit tasks that did not contribute 
significantly
 to the boot. Processes that are too 
short-lived (only
@@ -106,14 +106,14 @@
 /varlistentry
 
 varlistentry
-termvarnameoutput=[path]/varname/term
+termvarnameOutput=[path]/varname/term
 listitemparaConfigures the output folder 
for writing
 the graphs. By default, bootchart writes the 
graphs to
 
filename/run/log/filename./para/listitem
 /varlistentry
 
 varlistentry
-termvarnameinit=[path]/varname/term
+termvarnameInit=[path]/varname/term
 listitemparaConfigures bootchart to run a 
non-standard
 binary instead of 
filename/sbin/init/filename. This
 option is only relevant if bootchart was 
invoked from the
@@ -122,25 +122,25 @@
 /varlistentry
 
 varlistentry
-termvarnamepss=0/varname/term
-listitemparaIf set to 1, enables logging 
and graphing
+
termvarnamePlotMemoryUsage=no/varname/term
+listitemparaIf set to yes, enables logging 
and graphing
 of processes PSS memory 
consumption./para/listitem
 /varlistentry
 
 varlistentry
-termvarnameentropy=0/varname/term
-listitemparaIf set to 1, enables logging 
and graphing
+
termvarnamePlotEntropyGraph=no/varname/term
+listitemparaIf set to yes, enables logging 
and graphing
 of the kernel random entropy pool 
size./para/listitem
 /varlistentry
 
 varlistentry
-  

[systemd-devel] [PATCH] man: Write man page for systemd-bootchart(1)

2013-02-13 Thread William Giokas
Mostly coppied from bootchart.conf(5)

Signed-off-by: William Giokas 1007...@gmail.com
---
 man/systemd-bootchart.xml | 92 +--
 1 file changed, 89 insertions(+), 3 deletions(-)

diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml
index f31d4a0..7534110 100644
--- a/man/systemd-bootchart.xml
+++ b/man/systemd-bootchart.xml
@@ -10,6 +10,7 @@
 
   Authors:
 Auke Kok auke-jan.h@intel.com
+William Giokas 1007...@gmail.com
 
   systemd is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
@@ -91,9 +92,94 @@
 refsect1
 titleOptions/title
 
-paraPlease read systemd-bootchart --help or the 
bootchart.conf manual
-page for information about the various options that influence 
how
-systemd-bootchart operates./para
+variablelist class='bootchart-directives'
+
+varlistentry
+termoption-n/option/term
+termoption--sample N/option/term
+listitemparaSpecify the amount of samples 
to
+record total before bootchart exits. Each 
sample will
+record at intervals defined by 
--freq./para/listitem
+/varlistentry
+
+varlistentry
+termoption-f/option/term
+termoption--freq N/option/term
+listitemparaSpecify the sample log 
frequency.
+This can be a fractional number, but must be 
larger than
+0.0. Most systems can cope with values under 
25-50 without
+impacting boot time severely./para/listitem
+/varlistentry
+
+varlistentry
+termoption-r/option/term
+termoption--rel/option/term
+listitemparaUse relative times instead of 
absolute
+times. This is useful for using bootchart at 
post-boot
+time to profile an already booted system, 
otherwise the
+graph would become extremely large. If set, the
+horizontal axis starts at the first recorded 
sample
+instead of time=0.0./para/listitem
+/varlistentry
+
+varlistentry
+termoption-F/option/term
+termoption--filter/option/term
+listitemparaDisable filtering of tasks 
tasks that
+did not contribute significantly to the boot. 
Processes
+that are too short-lived (only seen in one 
sample) or
+that do not consume any significant CPU time 
(less than
+0.001sec) will not be displayed in the output 
graph.
+/para/listitem
+/varlistentry
+
+varlistentry
+termoption-o/option/term
+termoption--output [path]/option/term
+listitemparaConfigures the output folder 
for writing
+the graphs. By default, bootchart writes the 
graphs to
+
filename/var/log/filename./para/listitem
+/varlistentry
+
+varlistentry
+termoption-i/option/term
+termoption--init [path]/option/term
+listitemparaSet init binary to run. 
Defaults to
+filename/sbin/init/filename.
+/para/listitem
+/varlistentry
+
+varlistentry
+termoption-p/option/term
+termoption--pss/option/term
+listitemparaEnable logging and graphing
+of processes PSS memory 
consumption./para/listitem
+/varlistentry
+
+varlistentry
+termoption-e/option/term
+termoption--entropy/option/term
+listitemparaEnable logging and graphing
+of the kernel random entropy pool 
size./para/listitem
+/varlistentry
+
+varlistentry

[systemd-devel] [PATCH] man: Make options consistent

2013-02-13 Thread William Giokas
Option listings seemed to be pretty much random, some were short opt,
long opt, others were long opt, short opt. This just makes every option
with a short and long opt that I could find in the order short opt, long
opt, for formatting's sake.

Signed-off-by: William Giokas 1007...@gmail.com
---
 man/hostnamectl.xml |  2 +-
 man/journalctl.xml  | 26 +-
 man/localectl.xml   |  2 +-
 man/loginctl.xml|  8 
 man/systemctl.xml   | 18 +-
 man/systemd-coredumpctl.xml |  6 +++---
 man/systemd-delta.xml   |  2 +-
 man/systemd-nspawn.xml  | 10 +-
 man/timedatectl.xml |  2 +-
 9 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
index 07d3634..9efe220 100644
--- a/man/hostnamectl.xml
+++ b/man/hostnamectl.xml
@@ -93,8 +93,8 @@
 
 variablelist
 varlistentry
-termoption--help/option/term
 termoption-h/option/term
+termoption--help/option/term
 
 listitemparaPrints a short help
 text and exits./para/listitem
diff --git a/man/journalctl.xml b/man/journalctl.xml
index d8f8f68..5ed0e1f 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -114,8 +114,8 @@
 
 variablelist
 varlistentry
-termoption--help/option/term
 termoption-h/option/term
+termoption--help/option/term
 
 listitemparaPrints a short help
 text and exits./para/listitem
@@ -143,8 +143,8 @@
 /varlistentry
 
 varlistentry
-termoption--all/option/term
 termoption-a/option/term
+termoption--all/option/term
 
 listitemparaShow all fields in
 full, even if they include unprintable
@@ -153,8 +153,8 @@
 /varlistentry
 
 varlistentry
-termoption--follow/option/term
 termoption-f/option/term
+termoption--follow/option/term
 
 listitemparaShow only the most recent
 journal entries, and continuously print
@@ -163,8 +163,8 @@
 /varlistentry
 
 varlistentry
-termoption--lines=/option/term
 termoption-n/option/term
+termoption--lines=/option/term
 
 listitemparaShow the most recent
 journal events and limit the number of
@@ -185,8 +185,8 @@
 /varlistentry
 
 varlistentry
-termoption--output=/option/term
 termoption-o/option/term
+termoption--output=/option/term
 
 listitemparaControls the
 formatting of the journal entries that
@@ -240,8 +240,8 @@
 /varlistentry
 
 varlistentry
-termoption--catalog/option/term
 termoption-x/option/term
+termoption--catalog/option/term
 
 listitemparaAugment log lines with
 explanation texts from the message
@@ -264,8 +264,8 @@
 /varlistentry
 
 varlistentry
-termoption--quiet/option/term
 termoption-q/option/term
+termoption--quiet/option/term
 
 listitemparaSuppresses any warning
 message regarding inaccessible system
@@ -274,8 +274,8 @@
 /varlistentry
 
 varlistentry
-termoption--merge/option/term
 termoption-m/option/term
+termoption--merge/option/term
 
 listitemparaShow entries
 interleaved from all available
@@ -284,8 +284,8 @@
 /varlistentry
 
 varlistentry
-termoption--this-boot/option/term
 termoption-b/option/term

[systemd-devel] [PATCH] bootchart: Use os-release, not system-release

2013-02-13 Thread William Giokas
os-release is required for systemd now, so use that file and stop
printing 'Unknown' on the bootchart.
---
 src/bootchart/svg.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index d7c4168..ec81da9 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -195,11 +195,15 @@ static void svg_title(void)
 fclose(f);
 }
 
-/* Build - 1st line from /etc/system-release */
-f = fopen(/etc/system-release, r);
+/* Build - NAME line from /etc/os-release */
+f = fopen(/etc/os-release, r);
 if (f) {
-if (fgets(buf, 255, f))
-strncpy(build, buf, 255);
+while (fgets(buf, 255, f)) {
+if (strstr(buf, NAME=)) {
+strncpy(build, buf[5], 255);
+break;
+}
+}
 fclose(f);
 }
 
-- 
1.8.1.3.566.gaa39828

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] man: bootchart: change /var/log to /run/log

2013-02-13 Thread William Giokas
As of [1], bootchart stores files in /run/log, not /var/log, by default.

[1] f2f85884caac671da84256acb44148df9a4dca70
---
 man/bootchart.conf.xml   | 2 +-
 man/systemd-bootchart.xml| 2 +-
 src/bootchart/README | 2 +-
 src/bootchart/bootchart.conf | 2 +-
 src/bootchart/svg.c  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/man/bootchart.conf.xml b/man/bootchart.conf.xml
index 419554e..fb6e274 100644
--- a/man/bootchart.conf.xml
+++ b/man/bootchart.conf.xml
@@ -109,7 +109,7 @@
 termvarnameoutput=[path]/varname/term
 listitemparaConfigures the output folder 
for writing
 the graphs. By default, bootchart writes the 
graphs to
-
filename/var/log/filename./para/listitem
+
filename/run/log/filename./para/listitem
 /varlistentry
 
 varlistentry
diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml
index 7534110..a3fea05 100644
--- a/man/systemd-bootchart.xml
+++ b/man/systemd-bootchart.xml
@@ -138,7 +138,7 @@
 termoption--output [path]/option/term
 listitemparaConfigures the output folder 
for writing
 the graphs. By default, bootchart writes the 
graphs to
-
filename/var/log/filename./para/listitem
+
filename/run/log/filename./para/listitem
 /varlistentry
 
 varlistentry
diff --git a/src/bootchart/README b/src/bootchart/README
index a209caf..03b0fe9 100644
--- a/src/bootchart/README
+++ b/src/bootchart/README
@@ -18,7 +18,7 @@ where possible problems exist in the startup sequence of the 
system.
 Of course, bootchart can also be used at any moment in time to collect and
 graph some data for an amount of time. Bootchart does not even require root
 privileges to do so, and will happily run as a normal user. Bootchart graphs
-are by default written time-stamped in /var/log.
+are by default written time-stamped in /run/log.
 
 --
 
diff --git a/src/bootchart/bootchart.conf b/src/bootchart/bootchart.conf
index fa1a09b..0797504 100644
--- a/src/bootchart/bootchart.conf
+++ b/src/bootchart/bootchart.conf
@@ -12,7 +12,7 @@
 #freq=25
 #rel=0
 #filter=1
-#output=folder name, defaults to /var/log
+#output=folder name, defaults to /run/log
 #init=/path/to/init-binary
 #pss=0
 #entropy=0
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index ec81da9..fca3413 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -98,7 +98,7 @@ static void svg_header(void)
 svg(!-- such as Chrome, Chromium, or Firefox. Other applications 
that   --\n);
 svg(!-- render these files properly but more slowly are ImageMagick, 
gimp,  --\n);
 svg(!-- inkscape, etc. To display the files on your system, just 
point  --\n);
-svg(!-- your browser to file:///var/log/ and click. This bootchart 
was  --\n\n);
+svg(!-- your browser to file:///run/log/ and click. This bootchart 
was  --\n\n);
 
 svg(!-- generated by bootchart version %s, running with options:  
--\n, VERSION);
 svg(!-- hz=\%f\ n=\%d\ --\n, hz, len);
-- 
1.8.1.3.566.gaa39828

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] man: bootchart: change /var/log to /run/log

2013-02-13 Thread William Giokas
On Wed, Feb 13, 2013 at 09:57:56PM +0100, Zbigniew Jędrzejewski-Szmek wrote:
 On Wed, Feb 13, 2013 at 02:49:24PM -0600, William Giokas wrote:
  As of [1], bootchart stores files in /run/log, not /var/log, by default.
  
  [1] f2f85884caac671da84256acb44148df9a4dca70
  ---
   man/bootchart.conf.xml   | 2 +-
   man/systemd-bootchart.xml| 2 +-
   src/bootchart/README | 2 +-
 Could we extract what is usefull in this file and put it in the
 manpage?  The explanation how to run bootchart would be more
 accessible there, and the history parts could form a nice HISTORY
 section.

I'll get on that soon. Good idea.

Thanks,
-- 
William Giokas | KaiSforza
GnuPG Key: 0xE99A7F0F
Fingerprint: F078 CFF2 45E8 1E72 6D5A  8653 CDF5 E7A5 E99A 7F0F


pgpfaqpsKKO4u.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] man: Add even more to the bootchart man page

2013-02-13 Thread William Giokas
Essentially transfer the 'README' file in src/bootchart to the man page
for easier reading by users.
---
 man/systemd-bootchart.xml | 144 +-
 1 file changed, 130 insertions(+), 14 deletions(-)

diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml
index a3fea05..7c72237 100644
--- a/man/systemd-bootchart.xml
+++ b/man/systemd-bootchart.xml
@@ -54,10 +54,64 @@
 refsect1
 titleDescription/title
 
-paraSystemd-bootchart is an boot time analysis tool. It 
represents
-various aspects of the system as graph elements. These graph
-elements allow the user to determine resource usage, efficiency
-and performance issues./para
+parasystemd-bootchart is a tool used to analyze a boot 
sequence.
+It collects system information pertaining to the CPU and disk 
load, as
+well as per-process information, and then creates a chart with 
this
+information. Usually it is invoked by setting the init to
+filenamesystemd-bootchart/filename on the kernel command 
line. It
+be run after boot to analyze running processes, though it is 
recommended
+to use the option--rel/option switch when doing 
this./para
+
+paraAfter collecting a certain amount of data (default: 20 
seconds) it
+will write the SVG chart to filename/run/log/filename. 
This chart
+can be used to find problems in the start up sequence and 
where these
+problems exist. It is essentially a more detailed version of 
the
+systemd-analyze plot function./para
+
+/refsect1
+
+refsect1
+titleHistory/title
+
+paraThis version of bootchart was implemented from scratch, 
but inspired
+  by former bootchart incantations:/para
+
+variablelist
+varlistentry
+termoptionOriginal bash/option/term
+listitemparaThe original bash/shell code 
implemented
+bootchart. This version created a compressed 
tarball for
+processing with external applications. This 
version did
+not graph anything, only generated 
data./para/listitem
+/varlistentry
+
+varlistentry
+termoptionUbuntu C 
Implementation/option/term
+listitemparaThis version replaced the 
shell version with
+a fast and efficient data logger, but also did 
not graph
+the data./para/listitem
+/varlistentry
+
+varlistentry
+termoptionJava bootchart/option/term
+listitemparaThis was the original graphing 
application
+for charting the data, written in 
java./para/listitem
+/varlistentry
+
+varlistentry
+termoptionpybootchartgui.py/option/term
+listitemparapybootchart created a graph 
from the data
+collected by either the bash or C 
version./para/listitem
+/varlistentry
+/variablelist
+
+paraThe version of bootchart you are using now combines both 
the data
+collection and the charting into a single application, making 
it more
+efficient and simpler. There are no longer any timing issues 
with the data
+collector and the grapher, as the graphing cannot be run until 
the data
+has been collected. Also, the data kept in memory is reduced 
to the absolute
+minimum needed./para
+
 
 /refsect1
 
@@ -69,15 +123,15 @@
 variablelist
 
 varlistentry
-titleKernel invocation/title
+termoptionKernel invocation/option/term
 listitemparaThe kernel can invoke 
systemd-bootchart
 instead of the init process. In itself, 
systemd-bootchart
 will invoke filename/sbin/init/filename if 
invoked in
-this matter./para/listitem
+this manner./para/listitem
 /varlistentry
 
 varlistentry
-titleStarted as a standalone program/title
+termoptionStarted as a standalone 
program/option/term
   

[systemd-devel] [PATCH V2] man: Add even more to the bootchart man page

2013-02-13 Thread William Giokas
Essentially transfer the 'README' file in src/bootchart to the man page
for easier reading by users.
---
 man/systemd-bootchart.xml | 120 --
 1 file changed, 106 insertions(+), 14 deletions(-)

diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml
index a3fea05..22412d3 100644
--- a/man/systemd-bootchart.xml
+++ b/man/systemd-bootchart.xml
@@ -54,10 +54,64 @@
 refsect1
 titleDescription/title
 
-paraSystemd-bootchart is an boot time analysis tool. It 
represents
-various aspects of the system as graph elements. These graph
-elements allow the user to determine resource usage, efficiency
-and performance issues./para
+parasystemd-bootchart is a tool used to analyze a boot 
sequence.
+It collects system information pertaining to the CPU and disk 
load, as
+well as per-process information, and then creates a chart with 
this
+information. Usually it is invoked by setting the init to
+filenamesystemd-bootchart/filename on the kernel command 
line. It
+be run after boot to analyze running processes, though it is 
recommended
+to use the option--rel/option switch when doing 
this./para
+
+paraAfter collecting a certain amount of data (default: 20 
seconds) it
+will write the SVG chart to filename/run/log/filename. 
This chart
+can be used to find problems in the start up sequence and 
where these
+problems exist. It is essentially a more detailed version of 
the
+systemd-analyze plot function./para
+
+/refsect1
+
+refsect1
+titleHistory/title
+
+paraThis version of bootchart was implemented from scratch, 
but inspired
+  by former bootchart incantations:/para
+
+variablelist
+varlistentry
+termoptionOriginal bash/option/term
+listitemparaThe original bash/shell code 
implemented
+bootchart. This version created a compressed 
tarball for
+processing with external applications. This 
version did
+not graph anything, only generated 
data./para/listitem
+/varlistentry
+
+varlistentry
+termoptionUbuntu C 
Implementation/option/term
+listitemparaThis version replaced the 
shell version with
+a fast and efficient data logger, but also did 
not graph
+the data./para/listitem
+/varlistentry
+
+varlistentry
+termoptionJava bootchart/option/term
+listitemparaThis was the original graphing 
application
+for charting the data, written in 
java./para/listitem
+/varlistentry
+
+varlistentry
+termoptionpybootchartgui.py/option/term
+listitemparapybootchart created a graph 
from the data
+collected by either the bash or C 
version./para/listitem
+/varlistentry
+/variablelist
+
+paraThe version of bootchart you are using now combines both 
the data
+collection and the charting into a single application, making 
it more
+efficient and simpler. There are no longer any timing issues 
with the data
+collector and the grapher, as the graphing cannot be run until 
the data
+has been collected. Also, the data kept in memory is reduced 
to the absolute
+minimum needed./para
+
 
 /refsect1
 
@@ -69,15 +123,15 @@
 variablelist
 
 varlistentry
-titleKernel invocation/title
+termoptionKernel invocation/option/term
 listitemparaThe kernel can invoke 
systemd-bootchart
 instead of the init process. In itself, 
systemd-bootchart
 will invoke filename/sbin/init/filename if 
invoked in
-this matter./para/listitem
+this manner./para/listitem
 /varlistentry
 
 varlistentry
-titleStarted as a standalone program/title
+termoptionStarted as a standalone 
program/option/term
   

[systemd-devel] [PATCH V3] man: Add even more to the bootchart man page

2013-02-13 Thread William Giokas
Essentially transfer the 'README' file in src/bootchart to the man page
for easier reading by users.
---

 I don't think that this is a good idea. It mixes semantic and visual
 markup and it'll confuse make-directive-index.py badly.
 Maybe termemphasisOriginal bash//?

I see your point. Fixed in this version.

I also moved the 'History' section to the bottom, before the 'See Also'
section. I thought it more appropriate to show the options and invocation
before this. 

 Hm, again, this will confuse automatic tools. Actually this part might
 better go into README.

Ah. Yes. The point of this man page was to bring the README file to the
end user, but I guess that doesn't seem terribly appropriate for the man
page. Removed.

Thanks for the feedback. If there's anything else I need to fix, just
tell me.

 man/systemd-bootchart.xml | 100 ++
 1 file changed, 83 insertions(+), 17 deletions(-)

diff --git a/man/systemd-bootchart.xml b/man/systemd-bootchart.xml
index a3fea05..f87f821 100644
--- a/man/systemd-bootchart.xml
+++ b/man/systemd-bootchart.xml
@@ -54,10 +54,19 @@
 refsect1
 titleDescription/title
 
-paraSystemd-bootchart is an boot time analysis tool. It 
represents
-various aspects of the system as graph elements. These graph
-elements allow the user to determine resource usage, efficiency
-and performance issues./para
+parasystemd-bootchart is a tool used to analyze a boot 
sequence.
+It collects system information pertaining to the CPU and disk 
load, as
+well as per-process information, and then creates a chart with 
this
+information. Usually it is invoked by setting the init to
+filenamesystemd-bootchart/filename on the kernel command 
line. It
+be run after boot to analyze running processes, though it is 
recommended
+to use the option--rel/option switch when doing 
this./para
+
+paraAfter collecting a certain amount of data (default: 20 
seconds) it
+will write the SVG chart to filename/run/log/filename. 
This chart
+can be used to find problems in the start up sequence and 
where these
+problems exist. It is essentially a more detailed version of 
the
+systemd-analyze plot function./para
 
 /refsect1
 
@@ -69,15 +78,15 @@
 variablelist
 
 varlistentry
-titleKernel invocation/title
+termemphasisKernel 
invocation/emphasis/term
 listitemparaThe kernel can invoke 
systemd-bootchart
 instead of the init process. In itself, 
systemd-bootchart
 will invoke filename/sbin/init/filename if 
invoked in
-this matter./para/listitem
+this manner./para/listitem
 /varlistentry
 
 varlistentry
-titleStarted as a standalone program/title
+termemphasisStarted as a standalone 
program/emphasis/term
 listitemparaOne can execute 
systemd-bootchart as
 normal application from the commandline. In 
this mode
 it is highly recommended to pass the -r flag 
in order
@@ -92,12 +101,15 @@
 refsect1
 titleOptions/title
 
-variablelist class='bootchart-directives'
+paraThese options can be set globally in the 
filename/etc/systemd/bootchart.conf/filename
+file./para
+
+variablelist
 
 varlistentry
 termoption-n/option/term
 termoption--sample N/option/term
-listitemparaSpecify the amount of samples 
to
+listitemparaSpecify the amount of samples, 
N, to
 record total before bootchart exits. Each 
sample will
 record at intervals defined by 
--freq./para/listitem
 /varlistentry
@@ -105,10 +117,10 @@
 varlistentry
 termoption-f/option/term
 termoption--freq N/option/term
-listitemparaSpecify the sample log 
frequency.
+listitemparaSpecify the sample log 
frequency, N.
 This can be a fractional number, but must be 
larger than
 0.0. Most systems can cope with values under 
25-50 without
-  

Re: [systemd-devel] [PATCH][V3] systemd-analyze: rewrite in C.

2013-02-04 Thread William Giokas
On Mon, Feb 04, 2013 at 09:32:33PM +0100, Simon Peeters wrote:
 Written by Peeters Simon peeters.si...@gmail.com. Makefile stuff
 and cleaned up a bit by Auke Kok auke-jan.h@intel.com.
 ---
 
 Fixed some stuff and dit some more cleanup.
 
 This should just cover the same usage as the old systemd-analyze, but we can
 add more functionality afterwards (systemctl dot, other output formats,...)
 
 This is the rebased version as asked by William.
Thanks! It applied cleanly. Just a comment in the analyze_plot fucntion.
Previously I mentioned that really short boot times make plots that are
too small to really read anything, and I kept getting graphs that were
trunctated and short, basically telling me how long the kernel took to
get ready and maybe the initrd. I thought this was fixed seeing this
patch[1], but then I realized that width is not even used in the svg, it
re-calculates the width for some reason here[2]. Just changing that line
to `width,` and everything works as expected. (Otherwise the 800.0 width
or 1000.0 width isn't actually used in the svg)

-SNIP-
 +static int analyze_plot(DBusConnection *bus)
 +{
 +struct unit_times *times;
 +struct boot_times boot;
 +int n, m = 1;
 +double width;
 +
 +n = get_boot_times(bus, boot);
 +if (n)
 +return n;
 +
 +n = acquire_time_data(bus, times);
 +if (n=0)
 +return n;
 +
 +qsort(times, n, sizeof(struct unit_times), compare_unit_start);
 +
 +width = 80 + (scale_x * (boot.firmware_time + boot.finish_time) * 
 0.01);
[1]
 +if (width  800.0)
 +width = 800.0;
 +
 +if (boot.firmware_time  boot.loader_time)
 +m++;
 +if (boot.loader_time) {
 +m++;
 +if (width  1000.0)
 +width = 1000.0;
 +}
 +if (boot.initrd_time)
 +m++;
 +if (boot.kernel_time)
 +m++;
 +
 +for (int i=0; i  n; i++)
 +if (times[i].ixt = boot.userspace_time  times[i].ixt = 
 boot.finish_time)
 +m++;
 +
 +svg(?xml version=\1.0\ standalone=\no\?\n);
 +svg(!DOCTYPE svg PUBLIC \-//W3C//DTD SVG 1.1//EN\ );
 +svg(\http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\;\n);
 +
 +svg(svg width=\%.0fpx\ height=\%.0fpx\ version=\1.1\ ,
[2]
 +80.0 + (scale_x * (boot.firmware_time + 
 boot.finish_time) * 0.01),
 +150.0 + (m *scale_y));
 +svg(xmlns=\http://www.w3.org/2000/svg\;\n\n);
 +
 +/* write some basic info as a comment, including some help */
 +svg(!-- This file is a systemd-analyze SVG file. It is best 
 rendered in a   --\n
 +!-- browser such as Chrome/Chromium, firefox. Other 
 applications that   --\n
 +!-- render these files properly but much more slow are 
 ImageMagick, --\n
 +!-- gimp, inkscape, etc.. To display the files on your system, 
 just --\n
 +!-- point your browser to file:///var/log/ and click.  
  --\n\n
 +!-- this plot was generated by systemd-analyze version 
 %-16.16s --\n\n, VERSION);

Also, this could use a few fixes:
 * Chrome/Chromium, firefox - Chrome, Chromium or Firefox
 * much more slow - much slower
 * this plot was generated - This plot was generated
 * etc.. - etc.

-SNIP-

Thanks,
-- 
William Giokas | KaiSforza
GnuPG Key: 0xE99A7F0F
Fingerprint: F078 CFF2 45E8 1E72 6D5A  8653 CDF5 E7A5 E99A 7F0F


pgpIcMIEvqfiu.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] journalctl to csv

2013-01-29 Thread William Giokas
On Tue, Jan 29, 2013 at 04:29:14PM +0800, Kai Hendry wrote:
 On 29 January 2013 15:33, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl 
 wrote:
  Try 'journalctl --lines=0 --follow' with the latest git.
 
 Ah, I see the change:
 http://cgit.freedesktop.org/systemd/systemd/commit/?id=67e04a486b92fcb656049cb4d6b66148c7d2e61b
 
 I'm too much of a newbie to compile systemd from git on Arch just yet.
 Unless git is packaged somewhere?
 
There's a PKGBUILD[0] for it, actually.

[0] https://aur.archlinux.org/packages/systemd-git/

-- 
William Giokas | KaiSforza
GnuPG Key: 0xE99A7F0F
Fingerprint: F078 CFF2 45E8 1E72 6D5A  8653 CDF5 E7A5 E99A 7F0F


pgpTi4UJtRQYs.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Verbose output option when starting daemons manually

2012-11-08 Thread William Giokas
All,

I have been using systemd for a few months now, and I must say, it is a
great init system. I myself am no coder, else I would attempt to write
something to do just this. One not-dealbreaking thing that I do find
lacking is a verbose option for `systemctl start unit`, essentially
running `journalctl -f -u unit` (and possibly for multiple dependent
units as well). For most services, I feel like this would be a line or
two of output just saying It worked! or It broke! but for services
like netcfg@, or services that start dependencies, it could be useful to
see what's getting started and how it's getting started. Again, feel free
to ignore me, I don't know how feasible or practical this would be, but
it seems like it would be useful.

Again, sorry that I cannot put something together myself to at least
show you. 

Thank you for your time.

-- 
William Giokas | KaiSforza
GnuPG Key: 0xE99A7F0F
Fingerprint: F078 CFF2 45E8 1E72 6D5A  8653 CDF5 E7A5 E99A 7F0F


pgphKEJ3jQMSs.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Verbose output option when starting daemons manually

2012-11-08 Thread William Giokas
On Fri, Nov 09, 2012 at 12:45:22AM +, Jóhann B. Guðmundsson wrote:
 Not the first and probably not the last that expected that behavior
 and proposed this.
 
 What's lacking is the status to be shown when units are manually
 started/reloaded/restart/stopped there is just one slight problem
 implementing that which is you dont want that output when the
 service is started at boot time or shutdown...
 
 perhaps that could be solved by introducing specific boot-start and
 shutdown-stop switches which would only be used to start unit or
 shut down units at boot-up/shutdown
 
 JBG

Yes, this is something I thought of, and if it is simply a flag when
invoking systemctl (such as `systemctl --verbose start unit`), then it
would not introduce anything to the boot/poweroff output. 

-- 
William Giokas | KaiSforza
GnuPG Key: 0xE99A7F0F
Fingerprint: F078 CFF2 45E8 1E72 6D5A  8653 CDF5 E7A5 E99A 7F0F


pgppgVGI8j556.pgp
Description: PGP signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel