Atajos Bash / libreadline

En el blog de jyr tiene una entrada acerca de los atajos (shorcuts / key bindings) que usa diariamente, esta es mi lista un poco mas extensa no es que use todos pero si muchos de ellos.

Ctrl-a -> go to the start of command line
Ctrl-e -> go to the end of command line
Ctrl-p -> previous command in history
Ctrl-n -> next command in history
Ctrl-f -> next character in command line
Ctrl-b -> previous character in command line
Ctrl-r -> reverse search in history file
Ctrl-d -> delete current character
Ctrl-k -> delete from the prompt to the end of command line
Ctrl-l -> Clear the terminal screen
Ctrl-u -> Kill to the beginning of the line.
Ctrl-y -> Yank, or paste, the text that ws las killed. Text is inserted at the point where the cursor is.
Ctrl-_ -> undo (yes, but limited)
Ctrl-c -> Terminate the command
Ctrl-xx -> Move between EOL and current cursor position
Ctrl-x @ ->Show possible hostname completions
Ctrl-z -> Suspend / stop command
Ctrl-t -> swap two chars
Ctrl-x+Ctrl-e -> Opens the editor defined on $EDITOR variable
Ctrl-w -> Delete word by word backwards or token by token
Ctrl-h -> Delete a character backwards
Ctrl-d -> Logout / close shell
Meta-< -> go to beginning of history file
Meta-> -> go to end of history file
Meta-f -> go to next word in command line
Meta-b -> go to previous word in command line
Meta-d -> delete next word in command line (from the actual position
of the prompt)
Meta-? ->Show current completion list
Meta-* -> Insert all possible completions
Meta-/ -> Attempt to complete filename
Meta-. -> Yank last argument to previous command
Meta-c -> Capitalize a character
Meta-l (L) -> Make a char lower case
Meta-n -> Search the history forwards non-incremental
Meta-p -> Search the history backwards non-incremental
Meta-r -> Recall command
Meta-t -> Move words around
Meta-u -> Make word uppercase
Meta-backspace -> Delete backwars lexical words
-> All available commands
(string) -> All available commands starting with (string)
/Tab-Tab -> Entire directory structure
*Tab-Tab -> Only subdirs
~Tab-Tab -> All present users on system from “/etc/passwd”
$Tab-Tab -> All system variables
@Tab-Tab -> Entries from “etc/hosts”
=Tab-Tab -> Output like ‘ls’ or ‘dir’ commands
Shift-PageUp -> Previous screen of commands
Shift-PageDown -> Next screen of commands

set -o vi -> change to vi/wim mode keybindings forget the above :)
set -o emacs -> return to default bash keybindings

Perdón si no los “traduji” pero me dio flojera :) si alguien gusta mande un patch con la lista ordenada alfabéticamente y traducida de preferencia en pdf (cheat-sheet?) a mi correo, gracias :-P

Esto aplica a Bash principalmente junto con otras shells, es decir todo lo que use la libreria libreadline usa estos atajos prácticamente, ejemplos emacs, consola de python, etc.

Leave a Reply

Your email address will not be published. Required fields are marked *