Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filename completion in ksh 2

Status
Not open for further replies.

grega

Programmer
Feb 2, 2000
932
GB
Can I configure ksh to do filename completion? I've never managed to get this working!

Regards,

Greg.
 
Carlos, I already use vi as the command line editor. What I need to know is either the key sequence used to invoke filename completion, or how to map such a key sequence.

The man page for ksh seems to suggest that the ESC-ESC sequence would work, but it doesn't for me :-(

Greg.
 
Greg,

The sequence is:

1 - set o-vi
( You can place this in either the .profile or .kshrc. I'd recommend the .kshrc)

2 - Type the number of characters to get a unique file name

3 - Press ESC then the backslash key

If all goes well it should complete the name of the file for you.

The trick is the characters that are passed need to be unique. If you have three files
called stuff1, stuff2, and stuff3. If you type in stuff and go through the sequence above you'll get nothing back because the command shell can not figure out which stuff file you mean.

HTH,


Steve B-)
 
No worries! Glad I could help you with this one.

Cheers!

Steve :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top