Auto Complete variable names in KSH


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Auto Complete variable names in KSH
# 1  
Old 04-08-2012
Auto Complete variable names in KSH

Hi,
I use KSH a lot.
I wanted to know if I can auto-complete a Variable name in the environment. I know this is possible in tcsh.
I use the vi mode to edit commands on command prompt.

Any help would be much appreciated.

Thanks..!!
# 2  
Old 04-08-2012
Please post what Operating System and version you are running:
Code:
uname -a # Obliterate anything confidential like machine names


Ps. I have not seen autocomplete work with ksh.
Using Esc K (two characters) gives you the current command to edit.
# 3  
Old 04-08-2012
Hi Methyl,
OS and version is
Code:
SunOS 5.10

Lets say I have 2 variable names as:
Code:
$SERIAL_RUN
$RUN_DIR

So, if I type echo $SER and press esc \ or something similar, it should complete the variable name as $SERIAL_RUN

Thanks

Last edited by grep_me; 04-08-2012 at 05:43 PM.. Reason: Adding example
# 4  
Old 04-08-2012
Based on the Kshell man page (man/man1/ksh.html man page -- look for the heading "In-line Editing Options") I don't believe variable name expansion is supported. From the doc, only filename and command expansion is implemented.

I could be wrong, but that is how I read it.
# 5  
Old 04-09-2012
I agree with agama. I don't recall this ever being a feature of unix. It is sort of a feature of ksh history if you have previously typed the command and the command is still in your history file. See man ksh and search for HISTORY .
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Emacs auto-complete comments too

I am using emacs auto-complete. Auto completion works well, however text inside comments blocks is not auto completed. I want to auto complete when writing comments as well but cannot find a way to set it up yet. (0 Replies)
Discussion started by: kristinu
0 Replies

2. Shell Programming and Scripting

Shell - Auto complete shell windows

*Sorry for my other post in French* Hi everyone! In my work I have to find how can I auto complete this type of windows (screenshot) in Shell with defined variables. http://opsi-fr.opensides.be/opsi-doc/stable/xhtml/fr/images/mysql-config-input-mask.png Thank you so much for replies! :) (1 Reply)
Discussion started by: devilsnake88
1 Replies

3. Shell Programming and Scripting

How to find complete file names in UNIX if i know only extention of file

Suppose I have a file which contains other file names with some extention . text file containt gdsds sd8ef g/f/temp_temp.sum yyeta t/unix.sum ghfp hrwer h/y/test.text.dat if then.... I want to get the complete file names, like for above file I should get output as temp_temp.sum... (4 Replies)
Discussion started by: panchal
4 Replies

4. Shell Programming and Scripting

Auto completion of file name in KSH.

Hi All, I am using SunOS 5.8 verison with KSH shell. My problem is I am not getting auto completion of file name on pressing of TAB or ESC key. While pressing ESC key , '^[' is getting printed . TAB is printing doin nothin but jus printing tab. What should I do to get auto completion of... (2 Replies)
Discussion started by: Sooraj_Linux
2 Replies

5. Shell Programming and Scripting

File name auto completion not working in KSH.Please help

Hi All, I am using SunOS 5.8 verison with KSH shell. My problem is I am not getting auto completion of file name on pressing of TAB or ESC key. While pressing ESC key , '^[' is getting printed . TAB is printing doin nothin but jus printing tab. What should I do to get auto completion of... (3 Replies)
Discussion started by: Sooraj_Linux
3 Replies

6. UNIX for Dummies Questions & Answers

auto-complete in terminal

Dear friend i have intalled sun solaris in vmware (vertual machine) untill now every things are ok but i have proplem when i tray to use tap key in terminal for auto complete the terminal window prsent to me space only i tried many also in many profile it seem the same proplem also if i print... (3 Replies)
Discussion started by: Mohammed-syria
3 Replies

7. Shell Programming and Scripting

Custom auto-complete

Hello: I am using csh, and am a complete noob when it comes to shell scripting. I want the following: 1) Ignore case when doing auto-complete. 2) If there are multiple matches (example: I have files abc.txt abc.txt.1, abc.txt.2 and type abc<tab>), count the number of matches. If... (1 Reply)
Discussion started by: madiyaan
1 Replies

8. UNIX for Dummies Questions & Answers

Auto Complete

Hi ! Can anybody please give me any clue how to set on the Auto Complete option (auto complete paths by pressing escape) in unix ? Thanks! Pablo. (4 Replies)
Discussion started by: cordobapablo
4 Replies

9. UNIX Desktop Questions & Answers

Auto complete

How can I set up the profile for a use so when entering a eg first charachter of a file and then pressing the tab OS will complete the file name. Thanks in advance Tom (4 Replies)
Discussion started by: Tom_Zamani
4 Replies

10. UNIX for Advanced & Expert Users

Auto Complete under AIX

How can one setup auto complete under AIX when you type a path etc. by pressing a sequece of keys yu can complete the line. Any sugestions !!!! (7 Replies)
Discussion started by: truma1
7 Replies
Login or Register to Ask a Question