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

Posted on 2004-11-09
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!
Question by:tawb
    LVL 51

    Expert Comment

    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)
    LVL 48

    Accepted Solution

    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


    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


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

    Expert Comment

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

    eg, here are a list of files

    you want to get

    type in:
    ck*l <ESC>=

    you get :

    type in ck*pl <ESC>\

    then you get:


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    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.

    794 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now