Solved

KORN SHELL filename completion in vi mode

Posted on 2001-08-16
3
1,072 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
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…
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…
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

623 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