1
vote
1answer
78 views

Is it possible to change the key binding for completion in bash shell?

For bash, I would to modify the tab key for completion to the escape key. I know that key bindings are defined in /etc/inputrc. But I don't know if something like this could work: `"\e" : ...
2
votes
5answers
274 views

How can I delete input in the terminal?

Xubuntu 13.10 Say I paste a command, something like sudo apt-get install abc yxz 123 DEF MMM KKK into the terminal. Then I suddenly had a change in mind and thus I would like to delete the last ...
3
votes
1answer
167 views

Navigating the CLI: replace text from specific character to specific character

I am a VIM user learning Emacs commands for use in Bash. I know that on my systems I can use Vim-keybindings in Bash but I'd like to learn how to use it effectively in its default configuration. ...
9
votes
2answers
446 views

Alt-Left to skip words does not work in terminal emulators

On a Debian Wheezy machine at previous job, I got used to Alt+Left and Alt+Right to skip between words on active command-line (in bash). However, since at home I have upgraded to Jessie (Debian 8.0, ...
3
votes
1answer
123 views

Navigating the CLI: Go back N words

I'm a Vim user, so I'm learning Emacs commands for use in the Bash CLI. I know that on my systems I can use Vim-keybindings in Bash but I'd like to learn how to use it effectively in its default ...
1
vote
3answers
444 views

How can I delete a word backward at the command line (bash and zsh)?

How can I delete a word backward at the command line? I'm truly used to some editors deleting the last 'word' using ctrl+backspace, and I'd like that functionality at the command line too. I am ...
3
votes
1answer
1k views

How to execute a script in shell when a shortcut key is pressed

How could I execute a script in Shell when a shortcut key is pressed. Essentially what I need is when a shortcut key is pressed the script should read from a file and display that content in the ...
2
votes
2answers
155 views

Is it possible to assign multiple commands to a single hotkey? (bash, xterm)

Back in the day, if my cursor was in the middle of a really long shell command I'd just hit Ctrl+C to get myself a new command prompt. Then I learned about Ctrl+K/C and life was good. Unfortunately ...
5
votes
1answer
530 views

Keyboard shortcut to copy current command from terminal to clipboard [duplicate]

Is there any way to copy current command (line typed in bash prompt) in terminal to X-clipboard without involving a mouse?
7
votes
1answer
133 views

The shell's “delete word” shortcut deletes too many characters

Under Bash some behavior of Alt+d has been driving me crazy since years and I figured out that maybe it could be fixed with a setting. If I'm at a terminal and issue a command like this: ...$ cat ...
3
votes
1answer
123 views

Bind to execute command with last argument of previous command

I want to create a bind that executes g++ !$ in the same way that the shell would interpret it if I just typed it. I tried: bind '"\ee": "g++ !$"', but it doesn't execute command (just "pastes" it) ...
0
votes
1answer
111 views

Can Bash Emacs shortcuts be enabled over SSH?

I find Bash keyboard shortcuts such as Ctrl-a (jump to start of line), Ctrl-k (cut text following caret), Ctrl-n/Ctrl-p (next/previous line in command history) immeasurably useful in day-to-day CLI ...
1
vote
1answer
166 views

Binding additional keyboard shortcuts in bash

I like typical GUI shortcuts: Ctrl-Backspace Ctrl-Del And other typical shortcuts. Are there any ready .bashrc with all this shortcuts available?
1
vote
1answer
142 views

How to create cross-platform keyboard bind commands?

I'd like to have the same keyboard shortcuts in all the terminals I use. Since they don't have the same *nix on them, and since terminals can be very different, I'm looking for a reasonably portable ...
4
votes
3answers
1k views

Bash: How do I move my cursor to the left a word-at-a-time?

In OSX I can just hold down the option key and press the left cursor key until I get to the word I need to edit (or in Vi I can just hit b, but I haven't been able to figure out how to do this in ...
5
votes
1answer
277 views

Emacs commands in xterm

I found that the commands I used to use in gnome-terminal, those I learned in Emacs, are only partially working in xterm. In some cases, I get strange chars like ÿ, æ, and â instead. Do you know how ...
3
votes
2answers
1k views

What does this output from xev mean?

I'm interested in remapping some keys on my keyboard. In particular, I want to hold down the Function key, press the F1 key, and have this trigger a script. I know that xev is useful for figuring out ...
1
vote
4answers
4k views

Can I access Nth line number of standard output?

Assuming a script that outputs a list of files: $> bash someScript.sh path/to/some/file path/to/the/file/i/want/to/work/with path/to/yet/another/file Now I want to have the second file-path as ...
4
votes
1answer
1k views

Remapping Ctrl-l in bash

Can one remap Ctrl-l in bash to execute more than just clear? I know normally it just clears the screen. I'm looking to change that to clear the screen and list my pwd like so: Ctrl-l:clear;ls;
7
votes
2answers
2k views

What is bash's meta key?

I tried to use xmodmap to map META_L to the MENU key but it doesn't seem to be accepted by bash as the meta key. So, I am wondering how these components (keyboard, X, xterm, bash) relate to each in ...
6
votes
2answers
1k views

How can I find what is interfering with CTRL+F?

I'm running LinuxMint12 with Gnome with Cario-Dock and I have a logitech G15 keyboard. I set up a bash script with the extra keys to take the active window, resize it, and move it to a specific ...
11
votes
4answers
1k views

Is it possible to configure ctrl-w (delete word)?

Normally, Ctrl-w deletes back to the last whitespace. Is it possible to configure it to use additional characters, such as /? Edit: To be more clear: I don't want to configure the key for it, I want ...
2
votes
1answer
607 views

Remap bash vi keys?

I use Dvorak and vi, so when I found out about the vi mode in Bash, I was very excited. However, it would be even better if I could remap the movement keys to be the ones that I use in vi (I swap keys ...
5
votes
3answers
734 views

How can I reset all the bind keys in my Bash?

I bound some keys by mistake, and they don't work any more, such as HOME, END, UP, DOWN, LEFT, RIGHT. Is there a way to reset all the bound keys to their original state?
9
votes
2answers
329 views

Weird control-d behavior

I can use cat as a very simple text editor by doing cat > foo.txt. If I then type: bar baz and then press ctrl+D, it now looks like this: $ cat > foo.txt bar baz^D with the cursor at the ...
3
votes
2answers
329 views

Bash: keybinding/trap issue

My .bashrc has the following: # Alt+L lists current directory bind -x "\"\el\":ls -ltrF --color=auto;" # trap commands and echo them to xterm titlebar. trap 'echo -ne "\033]0;$BASH_COMMAND - ...
11
votes
2answers
3k views

How to change previous/next word shortcut in bash?

How do I configure Ctrl-Left and Ctrl-Right as previous/next word shortcuts for bash (currently alt-b and alt-f)?
3
votes
2answers
358 views

Jump to start of the line in Bash's Vi mode

I'm using Bash Vi mode (aka set -o vi). Still I miss the Ctrl-A shortcut from Emacs mode, which is very handy. Many times I'm retrieving the last command and append an echo to the beginning of the ...
1
vote
4answers
913 views

Toggle between dvorak and qwerty

I've recently started to learn the dvorak keyboard layout, but I still need to use qwerty sometimes. I'm looking for a script to toggle between the two keyboard layouts. Also, I'd like to invoke ...
3
votes
2answers
830 views

How can I simulate keyboard shortcuts in a bash alias?

For example, one of my bash aliases is this alias p='clear;ls -lt;pwd;' clear also clears the history which I don't want. I just want to clear the screen momentarily. Ctrl+L however does exactly ...
4
votes
1answer
188 views

How can I make Ubuntu UI uniformly use bash keyboard shortcuts?

On my default 10.04 Ubuntu install I am consistently tripped up by the fact that some UI text areas/input boxes treat CtrlA as "select all" vs. "move my cursor to the beginning of the line." Is there ...