[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

K-shell: selecting an option from the enumerated list after using tab-complete ESC= command.

Posted on 2004-11-09
3
Medium Priority
?
307 Views
Last Modified: 2013-12-27
In K-shell (ksh), using the <ESC><=> (hit ESC key, then = key), you are presented with an enumerated list of possible filenames in the particular directory.  My question is: how do you *select* one of those options, i.e. instead of actually looking at the option you want, then manually typing it in on the command line.

Trivial I know, but difficult to decipher!
0
Comment
Question by:tawb
3 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 12539211
you're in ksh's emacs mode
you cannot "select" a file, you just can try to make the pattern more uniquie, then hit <ESC><ESC>
see man ksh  (emacs Editing Mode)
0
 
LVL 48

Accepted Solution

by:
Tintin earned 1500 total points
ID: 12539277
AFAIK, you can't specify them with a number, it's mostly so you know what matches you have.

Say you have a directory with

file1
file2
file3

If you are selecting the files with filename completion, it allows you to see what matches there are.

So if you did

ls f<ESC>\

that would auto complete 'file', but if you didn't know the complete list of available matches, you can then do

<ESC>=

to see everything that started with 'file' and then choose the appropriate name.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 12540386
As mentioned in the about comments, you can't select a file, but you can use combination
of
"*" , <ESC>=, <ESC>\

eg, here are a list of files
ckbox
ckmail
ckstr.pl
ckroot
ckhptest

you want to get chstr.pl

type in:
ck*l <ESC>=

you get :
ckmail
ckstr.pl

type in ck*pl <ESC>\

then you get:
chstr.pl


0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month19 days, 7 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question