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.

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.

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"

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)

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

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.

Thanks System Shock.
Thanks Smiling Dragon for your efforts and also helping me in my earlier issues.