public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* vi command line editing question.
@ 2008-06-23  7:13 gene golub
  2008-06-23  8:12 ` Gary Johnson
  0 siblings, 1 reply; 2+ messages in thread
From: gene golub @ 2008-06-23  7:13 UTC (permalink / raw)
  To: cygwin



Hi folks
 
I am using Korn Shell type editing of the command line. 
Here is an example:
 
I run isql command to ms sql server:
 
set -o vi
isql -E -S. <select @@servername
>go
!
 
It runs fine. But when I try to repeat an execution of this command by going to history, finding that command and pressing 'v' for command vi edditing, I get only first line:
 
osql -E -S . 
 
As for commands which were sourced to db server (select @@servername), they are not displayed and I have to type them again.
If I had used any Korn Shell port for Windows (MKS Tools), I would see next:
osql -E -S . <<

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vi command line editing question.
  2008-06-23  7:13 vi command line editing question gene golub
@ 2008-06-23  8:12 ` Gary Johnson
  0 siblings, 0 replies; 2+ messages in thread
From: Gary Johnson @ 2008-06-23  8:12 UTC (permalink / raw)
  To: cygwin

On 2008-06-23, gene golub wrote:
> Hi folks
>  
> I am using Korn Shell type editing of the command line. 
> Here is an example:
>  
> I run isql command to ms sql server:
>  
> set -o vi
> isql -E -S. <select @@servername
> >go
> !
>  
> It runs fine. But when I try to repeat an execution of this 
> command by going to history, finding that command and pressing 'v' 
> for command vi edditing, I get only first line:
>  
> osql -E -S . 
>  
> As for commands which were sourced to db server (select 
> @@servername), they are not displayed and I have to type them 
> again.
> If I had used any Korn Shell port for Windows (MKS Tools), I would 
> see next:
> osql -E -S . <<

I think this command will give you what you want:

   shopt -s cmdhist lithist

See the bash(1) man page.

HTH,
Gary


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-23  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-23  7:13 vi command line editing question gene golub
2008-06-23  8:12 ` Gary Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).