Rénich's Blog

Algunos key bindings para bash que casi nadie se sabe

Hero image for Algunos key bindings para bash que casi nadie se sabe

03 de noviembre de 2010

No he desifrado esto bien todavía pero, ahí va:

Descubrí que, en el manual de bash, vienen unos key bindings para bash muy interesantes. Vienen así:

8.4.1 Commands For Moving

`beginning-of-line (C-a)'
     Move to the start of the current line.

`end-of-line (C-e)'
     Move to the end of the line.

`forward-char (C-f)'
     Move forward a character.

`backward-char (C-b)'
     Move back a character.

`forward-word (M-f)'
     Move forward to the end of the next word.  Words are composed of
     letters and digits.

`backward-word (M-b)'
     Move back to the start of the current or previous word.  Words are
     composed of letters and digits.

`shell-forward-word ()'
     Move forward to the end of the next word.  Words are delimited by
     non-quoted shell metacharacters.

`shell-backward-word ()'
     Move back to the start of the current or previous word.  Words are
     delimited by non-quoted shell metacharacters.

`clear-screen (C-l)'
     Clear the screen and redraw the current line, leaving the current
     line at the top of the screen.

`redraw-current-line ()'
     Refresh the current line.  By default, this is unbound.

Descubrí que C-l = Ctrl + l

Y, además, M-f = Esc + f

Por lo pronto, ahí va una pequeña traducción:

En una terminal, prueba:

Ir al inicio de la línea: Ctrl + a.

Ir al final de la línea: Ctrl + e.

Brincarse una palabra hacia adelante: Esc + f

Brincarse una palabra hacia atrás: Esc + b

Limpiar la pantalla: Ctrl + l (ele)

Hay muchas más. Iré viendo qué onda y poniéndolas en más artículos. Pon comentarios si te sabes más! ;)