User friendly Unix ksh prompt to type directories/files | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

User friendly Unix ksh prompt to type directories/files

UNIX for Advanced & Expert Users


Tags
unix commands

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-15-2008
abdurrouf abdurrouf is offline
Registered User
 
Join Date: Feb 2008
Last Activity: 21 March 2012, 6:25 PM EDT
Location: Fort Lauderdale, FL
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
User friendly Unix ksh prompt to type directories/files

Hello,

I wanted to setup user friendly ksh command prompt, by typing first character of files or directories and then tab bring up whole word. No need to type whole file/directory/command names.

Example:

cat a file like university
just typing un and then tab bring up whole university wod.

Any help is greatly appreciated.

Thanks.

Abdur Rouf
Sponsored Links
    #2  
Old 02-15-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Last Activity: 21 October 2014, 10:08 AM EDT
Location: Out running a Marathon.
Posts: 2,332
Thanks: 73
Thanked 155 Times in 144 Posts
Hammer & Screwdriver Some of this may already be present in system

Assuming you have a file called university at your current directory location, you could type at the prompt:

> cat un

then hit the [Esc] key twice should fill in the rest of the word for the filename

This works for many unix commands.

Is it that you are trying to avoid typing the 'cat' command first?
Sponsored Links
    #3  
Old 02-15-2008
sb008 sb008 is offline Forum Advisor  
Registered User
 
Join Date: Jan 2007
Last Activity: 12 January 2013, 3:37 AM EST
Posts: 398
Thanks: 1
Thanked 3 Times in 3 Posts
Quote:
Originally Posted by joeyg View Post
Assuming you have a file called university at your current directory location, you could type at the prompt:

> cat un

then hit the [Esc] key twice should fill in the rest of the word for the filename

This works for many unix commands.

Is it that you are trying to avoid typing the 'cat' command first?
If <ESC><ESC> doesnt give you the full file name, it means there are at least 2 files starting with the same pattern.

To see which are those files type:
<ESC>=
    #4  
Old 02-15-2008
abdurrouf abdurrouf is offline
Registered User
 
Join Date: Feb 2008
Last Activity: 21 March 2012, 6:25 PM EDT
Location: Fort Lauderdale, FL
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
User friendly Unix ksh prompt to type directories/files

Yes it's woking and that is what I'm looking for . Thank you very much for your reply.
Before I use to work with bash where I used tab instead of Esc.

Thanks again.

Abdur Rouf
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
find command to list all the 777 files and directories owned by root user newtoaixos AIX 8 01-05-2012 02:08 PM
Deleting all files recursively from directories while ignoring one file type pasc Shell Programming and Scripting 3 10-16-2011 08:19 AM
find -type d returning files as well as directories tuns99 UNIX for Advanced & Expert Users 2 03-04-2010 12:27 PM
How can I make running gawk scripts more user-friendly in a Windows environment? jonathanm Shell Programming and Scripting 3 10-21-2008 07:26 AM
User friendly debut Shell Programming and Scripting 3 11-09-2005 06:13 PM



All times are GMT -4. The time now is 02:08 PM.