Ssh console prints ^H when pressing the return key - ssh

I did not know if I had to post that in a more system specific stack exchange. So please inform me where to go if this question does not belong here.
I am using mobaXterm tu SSH into a server. It worked fine for the last week, but since today, I have a behavior modification.
When I press the return key, it prints ^H instead of deleting previous character.
For example:
# cd bni/^H^H^H
Why did it suddenly change and how can I configure it to actualy delete the character instead of printing this ?
Edit: With a new terminal, the "problem" does not occur.

In MobaXterm's changelog https://mobaxterm.mobatek.net/download-home-edition.html, you can see they added a New option for sending ^H when pressing the backspace key in Version 3.0. It has a checkbox setting 'Backspace sends ^H' in Settings --> Terminal tab.
You can also use Shift+Backspace to remove a character.

You could also use the stty command to set your erase character:
stty erase {press backspace to get the ^H character}
You may need to include this in your login scripts to make it permanent.

Related

Reproducing Terminal.app's scrollback to previous prompt in iTerm2

By default Terminal.app has a keybinding for ⌘+↑ that scrolls the screen back to (and briefly highlights) the previous command prompt. (This seems to be independent of shell although I've only tried a couple. I'm using bash.)
I'm trying to get similar behavior in iTerm2, but I haven't found a mapping that does that. None of the search terms I've tried in iTerm2's list of key mappings suggest anything like this function. The iTerm2 mapping preset called Terminal.app Compatibility causes ⌘+↑ to scroll through previous commands, the same way ↑ does, rather than the window scrolling back to the lines on which previous commands were input.
Based on this answer to a similar question, I looked through the output of bind -p and see entries "\e[A": previous-history and "\e[B": next-history, but these seem to be describing the scrolling through previously-entered commands rather than scrolling through the entire terminal window output to the prompt at which the command was input. These are the only bind -p entries that refer to up or down arrows (if my assumption is correct that [A refers to the up arrow, which I determined with xxd -psd as suggested in this answer.
Is this behavior in Terminal.app the result of a key binding? Or, how would I determine whether it is or not? And is there a way to get iTerm2 to duplicate this behavior?
Have you tried
fn + CMD + UpArrow ?
Only an ersatz for Terminal.app "going up one prompt at a time” behavior, but maybe helpful as it makes iTerm2 do a Full Page Up consistently across my custom profiles and various key map preferences.
With shell integration installed, iTerm2 creates a "mark" at each prompt, and the default shortcut for moving to the previous mark is ⌘+⇧+↑.

How do you set copy mode from your screenrc?

I want to enter copy-mode by default from screen. Right now, I'm using stuff to start a server. I'd like to then enter copy-mode so I can just use the mouse to scroll up.
I can't just use stuff "Ctrl-a ESC" (even though Ctrl-a ESC entered from the terminal sets screen mode just fine).
Is there a special character for Ctrl-a that I can stuff? (like ^M for a return)
The command I needed was... copy.

Backspace doesn't work in sqlplus command line

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
Following the instructions here I was able to do the following and get this working:
Type stty erase in the terminal
Press CTRL+v on your keyboard
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)
Press enter
Now if I start up sql plus I can use the backspace key to delete mistyped characters.
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.
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.

When calling Vim from Midnight Commander, Ctrl-O makes me stuck in the Midnight Commander panel view

By default, Ctrl-O in Midnight Commander is used to show the console output. In /etc/mc/mc.keymap I have set ShowCommandLine to another keyboard shortcut, and now MC doesn't react to Ctrl-O.
Again, by default, Ctrl-O in Vim is used to cycle through previously accessed files. In my ~/.vimrc, I added map <C-o> <nop> and, just in case, imap <C-o> <nop>. Now, if called directly from terminal or xterm, Vim doesn't react to Ctrl-O either.
Despite this, if I call Vim from the Midnight Commander prompt, and then press Ctrl-O, I end up in the standard two-panel mode of Midnight Commander, and I can't Ctrl-O (nor Ctrl-I) out of it.
Naturally, if I try to start a new Vim task from MC, it now tells me that "the shell is already running a command," and if I simply want to F10 out of MC, it says "the shell is still active. quit anyway?", and if I do so, it, of course, kills Vim in the process.
How do I solve this issue?
What's happening here is that Vim captures Ctrl+O by default for navigating back in the jumplist. When you do :map <C-o> <nop>, Vim still captures the Ctrl+O key sequence; it just doesn't do anything about it. As far as Midnight Commander is concerned, you never pressed those keys; Vim captured the input first. I'm not aware of a way to make Vim stop capturing default key sequences.

Keybindings based on delay in vim

I would want vim to leave insert mode if the last key pressed is a } and no other key has been pressed for a while. Is this possible?
Adding a :timer command is still on the Vim TODO list.
If you want to vote for Vim features, you have to become a registered Vim user or sponsor. See the sponsor page.
Not sure it's worth it, but I think you should be able to do a workaround with info linked below. Notice that the particular keycodes in main tip need to be changed in latest versions of Vim:
http://vim.wikia.com/wiki/Timer_to_execute_commands_periodically
http://groups.google.com/group/vim_use/browse_thread/thread/8c535e5cf2b35f63/e40998ff7f2d909b?lnk=gst&q=yakov&pli=1