LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2009, 09:56 AM   #1
lopid
Member
 
Registered: Jun 2008
Posts: 156

Rep: Reputation: Disabled
Question Backgrounding MySQL/Bash/Vim


I have shortcuts that start up MySQL in mlterm. My $EDITOR is vim. This allows me to enter '\e' at the mysql prompt and edit my command. Previous to upgrading to 13 (I don't think I've done anything since then that would affect this), I was able to ctrl-z in vim and it would display the mysql session as it was before I entered \e. I could return to vim with ctrl-c. Now, however, ctrl-z flashes the mysql session but immediately returns me to vim.

I don't know if this is a vim, bash, or mysql issue :-/ Can anyone help?
 
Old 10-06-2009, 08:58 PM   #2
fericyde
LQ Newbie
 
Registered: Aug 2009
Location: Ohio
Distribution: Ubuntu
Posts: 10

Rep: Reputation: 0
Let me get it straight here -- you're at the mysql database prompt, and it's doing the things you describe?

Just to get on the same page I just loaded mysql-server on my wife's ubuntu computer.

When she complains about disk space, I'm going to blame you, sorry

Anyway, try this instead of the control/z you mention (that's an old vi short-hand that truly used to be synonymous with :wq! [write and quit], so if this was working before, it kinda sets off vi-purist alarm bells in my head

Instead of control/z, try:

[esc]:![return]

I know it's a couple of extra sequences, but it's vi for "shell out to the OS" which in this case is not an OS at all, but mysql.

I hope this helps -- maybe someone else on the list knows of a way to make the vim/mysql happiness work better, but the above should work theoretically.

Cheers!

-=FeriCyde=-
 
Old 10-08-2009, 05:06 AM   #3
lopid
Member
 
Registered: Jun 2008
Posts: 156

Original Poster
Rep: Reputation: Disabled
Duh, why didn't I think of that? :-)

I'm actually spawning gvim now, so I can see the mysql output always. I hope your wife is happy.
 
Old 10-09-2009, 07:25 AM   #4
fericyde
LQ Newbie
 
Registered: Aug 2009
Location: Ohio
Distribution: Ubuntu
Posts: 10

Rep: Reputation: 0
Happy to hear it!

She hasn't noticed the server so far :-)

Have a good day!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can MySQL log on via SSH/bash? mysql:x:27:101:MySQL Server:/var/lib/mysql:/bin/bash Ujjain Linux - Newbie 2 04-24-2009 02:21 PM
Editor comparison: vim VS vim-lite, Cleaning vim Ruler2112 *BSD 4 04-13-2009 04:26 PM
making Bash operate like VIM jus71n742 Programming 10 02-07-2009 11:06 AM
bash script backgrounding guttersnipe Programming 3 06-21-2007 07:56 PM
bash + vim on AIX slackamp AIX 2 09-22-2006 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration