[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Command completion with * in the middle?

From: Greg Wooledge
Subject: Re: [Help-bash] Command completion with * in the middle?
Date: Mon, 21 Jan 2019 08:55:08 -0500
User-agent: NeoMutt/20170113 (1.7.2)

On Sat, Jan 19, 2019 at 11:54:31PM -0500, David Niklas wrote:
> Peng Yu <address@hidden> wrote:
> > For example, if I type "l*.sh", then type TAB, is it possible to show
> > all the commands starting with "l" and ending with ".sh"? Thanks.
> For once Peng Yu has a great idea.
> Sadly, if there is such a way, I'm still searching for it...

In vi mode (it's ksh88 compatible, which is where I first learned this),
you can do ESC * to force the immediate expansion of the glob under
the cursor.

E.g. at a new shell prompt sitting in your home directory, type .b*
and then press ESC * and it should expand to all of your dot-files
that begin with "b".  The same goes for *.png or whatever glob you use.

I'd imagine there's something similar in emacs mode, but I don't use that.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]