From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13457 invoked by alias); 26 Jun 2013 08:59:46 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17835 Received: (qmail 15778 invoked from network); 26 Jun 2013 08:59:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f4-b7fd76d0000035e1-42-51caab140dbd Date: Wed, 26 Jun 2013 09:49:22 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: alias -s with background Message-id: <20130626094922.1e98ea2d@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupiluLIzCtJLcpLzFFi42I5/e/4FV2R1acCDebMFbDYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4Mh7OfMdcsI21omOpTAPjfJYuRk4OCQETic1tkxghbDGJC/fW s3UxcnEICSxllFg4+xETlMMkcffEPGaQKhYBVYnD/9ezgthsAoYSUzfNBusWERCVWL5iM3sX IweHMFDNoW4HEJNXwF7i78wAkApOgWCJJd+vMoHYQgIBEneX/GYDsfkF9CWu/v3EBHGDvcTM K2fAJvIKCEr8mHwP7E5mAS2JzduaWCFseYnNa94yT2AUmIWkbBaSsllIyhYwMq9iFE0tTS4o TkrPNdQrTswtLs1L10vOz93ECAm/LzsYFx+zOsQowMGoxMN7YtPJQCHWxLLiytxDjBIczEoi vG/mnwoU4k1JrKxKLcqPLyrNSS0+xMjEwSnVwKjpkR/W7WQxy/twe6THzvqvtdE2Na/+Nb+b EmvEc9HPePq08z+mtH4KbXrs5vin9NGj1acmMDcvPa72Tj7pOb+15Po3d8of5vq6HTN9XCbc nG07z+9g7vXSPRNFuSWrnpzX+n02wYpp7u8XHxYda9Y4JpMY+2OF8uJQpvlyOY/uTQ5Y/rXX d44SS3FGoqEWc1FxIgCia2HhHQIAAA== On Wed, 26 Jun 2013 09:50:20 +0200 Ivan Zanolla wrote: > I want start a program with alias -s. But if I wrote > > alias -s pdf = evince & > > don't work. Why? That's put the alias command into the background; also, you can't have spaces around the "=" or they are treated as different aliases. "alias -s", like other variants of alias, is limited to putting a new command at the start of the line. You need to do it something like this: evince_bg() { evince "$@" & } alias -s pdf=evince_bg (See also zsh-mime-setup, documented in the zshcontrib manual, if you already have MIME information for this in mailcap and mime.types files.) pws