The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to get rid of all the weird characters and color on bash shell Micz UNIX for Dummies Questions & Answers 1 10-07-2005 12:58 PM
shell specific prompt dranNfly UNIX for Dummies Questions & Answers 3 04-27-2005 05:50 AM
script to change shell and prompt SHYAM Shell Programming and Scripting 1 06-27-2004 05:46 AM
prompt in sh shell diegoe UNIX for Dummies Questions & Answers 1 12-30-2003 10:10 AM
No shell prompt? Mufasa UNIX for Dummies Questions & Answers 2 02-14-2002 03:31 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-30-2008
Registered User
 

Join Date: Oct 2007
Posts: 70
Stumble this Post!
Weird in Shell Prompt

Hi,

I saw something in weird in Shell prompt.
I did the following steps

1) Typed ls -l and pressed ESC without entering
2) Typed "v" (please notice that I did not type "i" after "v"), which opened vi editor
3) I see the "ls -l" command that I typed in shell prompt
4) Without modifying anything or changing anything, I quit the vi editor
5) All I could see the list of files - without typing the command.

Can anyone explain about this weird behaviour.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 01-30-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 709
Stumble this Post!
ESC v creates a special character. The shell or even app you use to connect will interpret this as it pleases and may do all kinds of things. It probably dumped the contents of your cut-buffer into the shell.
Reply With Quote
  #3 (permalink)  
Old 01-30-2008
Registered User
 

Join Date: Oct 2007
Posts: 70
Stumble this Post!
It acts only if there is/are some character(s) at the shell prompt.
I tried without typing any command or anything at the shell prompt then tried to do the same (typing ESC and "v") but it did not act like before.
If it dumps the cut-buffer into the shell then why didn't it do the samething when there are no characters at the shell prompt when I pressed ESC and "v"
Reply With Quote
  #4 (permalink)  
Old 01-30-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 709
Stumble this Post!
In that case, it must be either some other function of the app you use to connect. Either that of a shell function but it's not one I've seen before in bash, sh or csh.
I wonder if it's just the app sending an the same escape char to the shell as normally used for command completion (eg csh ESC-ESC etc)
Reply With Quote
  #5 (permalink)  
Old 01-31-2008
Registered User
 

Join Date: Oct 2007
Posts: 70
Stumble this Post!
I use Ksh and I have tried it in the following applications that connects to Unix.
1) Putty 2) Attachmate Reflection 3) HummingBird 4) MSDoS (cmd) using telnet

Above application, I have seen the same behavior. Probably its not application. Its something with Shell
Reply With Quote
  #6 (permalink)  
Old 01-31-2008
System Shock's Avatar
Registered User
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 371
Stumble this Post!
That is not strange behavior at all if you have "set -o vi" in your profile. Hitting escape at the command line puts you in line command vi mode, so you can edit your command before executing it; hitting vi brings up the full vi editor.
Reply With Quote
  #7 (permalink)  
Old 01-31-2008
Registered User
 

Join Date: Oct 2007
Posts: 70
Stumble this Post!
Thanks System Shock.
Thanks Smiling Dragon for your efforts and also helping me in my earlier issues.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:11 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0