zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: GnuPG 2.1 with Git, problem in zsh, not in ksh
Date: Wed, 28 Oct 2015 16:49:55 -0700	[thread overview]
Message-ID: <151028164955.ZM1462@torch.brasslantern.com> (raw)
In-Reply-To: =?iso-8859-1?Q?=3C20151028195059=2EGB3807=40laptop=2Elocal=3E?= =?iso-8859-1?Q?Comments=3A_In_reply_to_Andreas_Kusalananda_K=E4h=E4ri_=3C?= =?iso-8859-1?Q?andreas=2Ekahari=40bils=2Ese=3E?= =?iso-8859-1?Q?________=22Re=3A_GnuPG_2=2E1_with_Git=2C_problem_in_zsh=2C?= =?iso-8859-1?Q?_not_in_ksh=22_=28Oct_28=2C__8=3A50pm=29?=

On Oct 28,  8:50pm, Andreas Kusalananda Kähäri wrote:
} Subject: Re: GnuPG 2.1 with Git, problem in zsh, not in ksh
}
} I dunno. I was playing around with qemu the other night, and I typed
} "qemu-system-x86_64" followed by <space> and then <tab> and the shell
} decided to execute the command (possibly in an attempt to figure out
} its usage info somehow) which filled my terminal with all sorts of qemu
} logging crap. Is that a side-effect of using "compinit"?

Yes, that's a side-effect of using "compinit".  The completion function
_qemu invokes "qemu -M \?" to get a list of machines you might want to
run; "logging crap" is probably because the writer of _qemu neglected
to redirect stderr of that command.

diff --git a/Completion/Unix/Command/_qemu b/Completion/Unix/Command/_qemu
index db07eba..3c21c3e 100644
--- a/Completion/Unix/Command/_qemu
+++ b/Completion/Unix/Command/_qemu
@@ -2,7 +2,7 @@
 
 _qemu_log_items () {
   local -a opts hline
-  $service -d \? | while read -A hline; do
+  $service -d \? 2>/dev/null | while read -A hline; do
     [[ $hline[1] = Log ]] && continue
     opts=($opts "${hline[1]}[${hline[2,-1]}]")
   done
@@ -11,7 +11,7 @@ _qemu_log_items () {
 
 local _qemu_machines
 
-_qemu_machines=(${${${(f)"$($service -M \?)"}[2,-1]}%% *})
+_qemu_machines=(${${${(f)"$($service -M \? 2>/dev/null)"}[2,-1]}%% *})
 
 _arguments \
   '-'{fda,fdb,hda,hdb,hdc,hdd,cdrom}':disk image:_files' \


  reply	other threads:[~2015-10-28 23:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 11:11 Andreas Kusalananda Kähäri
2015-10-28 14:33 ` shawn wilson
2015-10-28 14:47   ` Andreas Kusalananda Kähäri
2015-10-28 15:02     ` Peter Stephenson
2015-10-28 16:22       ` Andreas Kusalananda Kähäri
2015-10-28 18:05         ` shawn wilson
2015-10-28 19:50           ` Andreas Kusalananda Kähäri
2015-10-28 23:49             ` Bart Schaefer [this message]
2015-10-29  6:47               ` Andreas Kusalananda Kähäri
2015-10-29 11:47                 ` Simon Ruderich
2015-10-29 17:22                   ` Andreas Kusalananda Kähäri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=151028164955.ZM1462@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).