Tagged Questions
3
votes
1answer
85 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)
...
1
vote
1answer
126 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
111 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 ...
2
votes
3answers
384 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 ...
4
votes
1answer
150 views
Emacs commands in xterm
I found that the commands I used to use in gnome-terminal/bash, those I learned in emacs, are only partially working in xterm/bash. In some cases, I get strange chars like ÿ, æ, and â instead. Do you ...
2
votes
2answers
663 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
1k 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
620 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;
6
votes
2answers
924 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
629 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 ...
6
votes
3answers
507 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 ...
1
vote
1answer
351 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
436 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
253 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
242 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 - ...
9
votes
1answer
2k 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
302 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
614 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
686 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
167 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 ...

