Zsh Mailing List Archive
Messages sorted by:
Re: suffix alias where the app has a space in it
- X-seq: zsh-users 24132
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-users@xxxxxxx>
- Subject: Re: suffix alias where the app has a space in it
- Date: Thu, 8 Aug 2019 12:47:29 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190808114732euoutp02004d5150fcef2664d8b7c2076d06346a~48BcsamOJ1498514985euoutp02Z
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1565264852; bh=8VzpOiNPmdsCKeD2/nNf1EtUBjlh3gZFi/NCKGq/aYs=; h=Subject:From:To:Date:In-Reply-To:References:From; b=fzYFMkijSwRkpoOrb1Lp+JtnqVd4it52iVhhjrYK9AQQAFGJ+sCIaoA5PkRyCYqKf o13sI0t4AbNbU8wmfeHtQvvp6QEwSVxVFa82Q0lY5QzTkY+6iq+XjiGm1e5mox3wuP k5LlqE2t5BeMmuZf5/jC8tKzTcLEo4DxmlTcBkgI=
- In-reply-to: <CADjGqHv7H6xsYHYwNwD49LEQsHWw4DdzBtpFK=C=umLGDNdZEQ@mail.gmail.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:email@example.com>
- List-unsubscribe: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CGME20190808111626epcas1p28034457322a4f06a363aed6763a5b859@epcas1p2.samsung.com> <CADjGqHv7H6xsYHYwNwD49LEQsHWw4DdzBtpFK=C=umLGDNdZEQ@mail.gmail.com>
On Thu, 2019-08-08 at 07:14 -0400, TJ Luoma wrote:
> I'm trying to use suffix aliases, but I ran into one issue I can't
> figure out: What do I do when I want to assign "The Unarchiver" as an
> app for archives such as .xz
> alias -s xz="the unarchiver"
> But that tries to use 'the' to open 'xz' files.
> Is there a way to encode a space in the app name?
The thing to remember about aliases is they are expanded very early in
the shell processing --- basically, replacement text is just dumped in
as a raw string where it'll be picked up exactly as is. So simply
adding a backslash works.
alias -s xz='the\ unarchiver'
Messages sorted by: