Solved

KORN SHELL filename completion in vi mode

Posted on 2001-08-16
3
1,059 Views
Last Modified: 2008-02-01
I am using vi mode in KSH (set -o vi)

I need to know the "vi" equivalent of emacs mode automatic completion ("escape escape")

THANKS
0
Comment
Question by:happyloman
  • 2
3 Comments
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 6393139
It's the same.  Except in Solaris, where it's broken.
0
 
LVL 6

Accepted Solution

by:
bira earned 200 total points
ID: 6393666
Hi

 Filename completion is only available if the the environment variables EDITOR and/or VISUAL are set to either emacs, gmacs or vi. For example:

   EDITOR=emacs

The value of the VISUAL variable takes precedence over the value of the EDITOR variable.

emacs- or gmacs-style file completion
To complete a file or directory name with emacs or gmacs set press the ESC key twice.

   ls -l on<ESC><ESC>line_help

If the filename is not completed enter more characters until the filename can be uniquely identified.

Directories are shown by the trailing / character.

vi-style file completion
To complete a file or directory name with vi set press the \ (backward slash) key.

   ls -l on\line_help

If the filename is not completed enter more characters until the filename can be uniquely identified.

Directories are shown by the trailing / character.

List possible names
To list all the possible names of files press the ESC key followed by the = key.

   ls -l S<ESC>=
   1) SIRS
   2) Solaris

Directories are shown by the trailing / character.

0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 6393882
What you describe as vi-style completion is not completion at all, but merely a listing.  Actual completion works both in emacs mode and vi mode, but not in vi mode on Solaris (because they're using an old/buggy version of ksh).
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

777 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