[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Need bash glob to be expanded and keep it ready in the readline
From: |
Andreas Kusalananda Kähäri |
Subject: |
Re: Need bash glob to be expanded and keep it ready in the readline |
Date: |
Sun, 17 Oct 2021 11:51:26 +0200 |
On Sun, Oct 17, 2021 at 01:36:15PM +0700, Budi wrote:
> How can bash glob star is expanded and keep the cursor ready on the
> readline so that keep current command from being executed
You may use "C-x *" (i.e. "Ctrl + x" and then "*") to expand the
globbing pattern just left of the cursor. This does not execute the
current line of input.
Example:
$ touch file{1..20}
$ rm file[0-9]
Assuming the current working directory was initially empty, pressing
"C-x *" after the "]" on the line above turns the line into
$ rm file1 file2 file3 file4 file5 file6 file7 file8 file9
--
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden
.