Solved

KORN SHELL filename completion in vi mode

Posted on 2001-08-16
3
1,068 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
cron job says it ran, no results 25 135
MarkLogic 1 116
Retreiving column names in Windows but not in Unix 11 93
Equivalent of WSUS for Solaris, AIX and Cisco devices 11 132
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

737 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