zsh-workers
 help / Atom feed
* Re: suffix alias where the app has a space in it
       [not found]         ` <CAH+w=7aShn_9VP18WtpuYSA70zAKR23v+K-JNQqj-4JGpOgUeQ__23215.3090693586$1565299951$gmane$org@mail.gmail.com>
@ 2019-08-08 21:53           ` Stephane Chazelas
  0 siblings, 0 replies; 1+ messages in thread
From: Stephane Chazelas @ 2019-08-08 21:53 UTC (permalink / raw)
  To: zsh-workers

2019-08-08 14:30:53 -0700, Bart Schaefer:
> On Thu, Aug 8, 2019 at 1:18 PM TJ Luoma <luomat@gmail.com> wrote:
> >
> > Related Question: is there a way to set a default command to use for
> > all suffixes, and then make additional aliases for other suffixes?
> 
> Not with alias.  You could try a command-not-found handler.
> 
> > Something like this:
> >
> > alias -s '*'='open'
> 
> What that means is that if you type
> 
> % foo.*
> 
> then "open foo.*" will be executed.  It does NOT mean that the alias
> will be invoked when you type
> 
> % foo.bar
> 
> Aliases do not do pattern matching.
[...]

And anyway, you would probably not want

/etc/init.d/foo start
or
gcc-8.0 -c a.c
or
myscript.pl
or
mkfs.ext4 /dev/sda12

to call "open those-commands" just because the name of the
command contains a dot character.

-- 
Stephane


^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20190808111626epcas1p28034457322a4f06a363aed6763a5b859@epcas1p2.samsung.com>
     [not found] ` <CADjGqHv7H6xsYHYwNwD49LEQsHWw4DdzBtpFK=C=umLGDNdZEQ@mail.gmail.com>
     [not found]   ` <1565264849.4375.2.camel@samsung.com>
     [not found]     ` <CADjGqHvnSrcNbu=SXV_42XDTh0VZe6g3a0er5Bn8-CQ+87Ap4A@mail.gmail.com>
     [not found]       ` <CADjGqHvJNjer085qWM_P_bBNU0QYxPsE33gQVKxQVoTLBJ3EZg@mail.gmail.com>
     [not found]         ` <CAH+w=7aShn_9VP18WtpuYSA70zAKR23v+K-JNQqj-4JGpOgUeQ__23215.3090693586$1565299951$gmane$org@mail.gmail.com>
2019-08-08 21:53           ` suffix alias where the app has a space in it Stephane Chazelas

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/ public-inbox