|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From c2026f28bdc64c608e9b00e8f7916c82f44ec610 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Eric Cook <llua@gmx.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Sat, 27 Sep 2014 08:48:09 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] shell-completion(zsh): journalctl's -b changes
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
removed pointless index sort of bootids.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
use `compadd -a' to add each array, instead of expanding possibly hundreds of words needlessly.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
optional completion of -b
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
shell-completion/zsh/_journalctl | 8 ++++----
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 0d16a26a6f..a469bbc9a7 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/shell-completion/zsh/_journalctl
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/shell-completion/zsh/_journalctl
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -41,11 +41,11 @@ _journal_fields() {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
_journal_boots() {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
local -a _bootid _previousboots
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- _bootid=( ${(fao)"$(_call_program bootid "$service -F _BOOT_ID")"} )
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ _bootid=( ${(f)"$(_call_program bootid "$service -F _BOOT_ID")"} )
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
_previousboots=( -{1..${#_bootid}} )
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
_alternative : \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- "offsets:boot offsets:(${_previousboots[1,-2]})" \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- "bootid:boot ids:(${_bootid[@]})"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ "offsets:boot offsets:compadd -a '_previousboots[1,-2]'" \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ "bootid:boot ids:compadd -a _bootid"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
_arguments -s \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -63,7 +63,7 @@ _arguments -s \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
{-x,--catalog}'[Show explanatory texts with each log line]' \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
{-q,--quiet}"[Don't show privilege warning]" \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
{-m,--merge}'[Show entries from all available journals]' \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- {-b+,--boot=}'[Show data only from the specified boot or offset]:boot id or offset:_journal_boots' \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ {-b+,--boot=}'[Show data only from the specified boot or offset]::boot id or offset:_journal_boots' \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
'--list-boots[List boots ordered by time]' \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
{-k,--dmesg}'[Show only kernel messages from the current boot]' \
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
{-u+,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \
|