8

In my sqlplus (for oracle) command line, the backespace doesn't work. How could I configure sqlplus for deleting characters from the command line with backspace? I don't use frequently sqlplus command line, only for making quickly interventions in my DB, it is very hazard for me the times I need to use.

Kind Regards. Thanks

3 Answers3

14

Following the instructions here I was able to do the following and get this working:

  1. Type stty erase in the terminal
  2. Press CTRL+v on your keyboard
  3. Press the Backspace Key on the keyboard (when I did this it put ^H on the line so my final line looked like stty erase ^H)
  4. Press enter

Now if I start up sql plus I can use the backspace key to delete mistyped characters.

Chris Magnuson
  • 5,780
  • 7
  • 34
  • 37
0

which platform are you working on?

in case it's linux, have a look at this section of a wikipedia article on the bash for some keyboard shortcuts. you should be able to navigate the sqlplus command line with the same shortcuts when you call sqlplus from the shell (bash). specifically, ctrl-b would be backspace.

collapsar
  • 17,010
  • 4
  • 35
  • 61
  • It is Solaris (Unix) Thanks – Alexis Sánchez Tello Apr 24 '14 at 12:40
  • Are you using the korn shell (ksh) ? [This SO post'](http://stackoverflow.com/questions/1623256/make-arrow-and-delete-keys-work-in-kornshell-command-line)s accepted answer shows how to make backspace (and some other keys) work, which should carry through to sqlplus as well. the z shell behaves similarly to the bash according to [this cheat sheet](http://www.cheatography.com/davidsouther/cheat-sheets/bash-zsh-shourtcuts/). – collapsar Apr 24 '14 at 13:06
0

Thank for your suggestions. In other forums I have found this workaround:

I have used stty -a for watching I/O settings: And I could see erase is set to ^?

So for setting the backspace for deleting characters I have set stty erase ^H, and then works for the session.

Thanks.