User Tools

Site Tools


bash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
bash [2026/03/01 20:26] – created reddybash [2026/10/17 00:39] (current) – reddy
Line 1: Line 1:
-====== bash ======+====== bash / zsh ======
  
 ===== untilfail script ===== ===== untilfail script =====
Line 11: Line 11:
  
  
 +===== Bash prompt =====
 +
 +<code>
 +Esc . : Repeat last param
 +Ctrl U : Cut backwards
 +Ctrl K : Cut forwards
 +Ctrl W : Cut previous word
 +Ctrl Y : Paste
 +Ctrl V : Verbatim / Insert literal control characters
 +Ctrl D / Esc D : Cut current character
 +Ctrl H : Cut prev character
 +Ctrl I / Tab : Autocomplete
 +Ctrl _ / Ctrl X, Ctrl U : Undo
 +Ctrl T : Swap characters before cursor
 +Esc T : Swap words before cursor
 +Esc C : Capitalize current character and move to end of the word
 +
 +Esc F : Forward 1 word
 +Esc B : Backward 1 word
 +Ctrl A : Go to line start
 +Ctrl E : Go to line end
 +Ctrl F : Forward 1 character
 +Ctrl B : Back 1 character
 +Ctrl XX : Toggle between positions in a line
 +Ctrl R : Search history
 +
 +Ctrl L : Clear screen
 +Ctrl C : Kill running command
 +
 +!! : Run previous command
 +!<something> : Run last command starting with <something>
 +!<something>:p : Display last command starting with <something>
 +!<n> : Run nth command in history
 +!^ : First arg of last command
 +!$ : Last arg of last command
 +^find^replace^ : Substitute in last command and run
 +</code>
 +
 +
 +===== bash Other =====
 +
 +<code>
 +bind -p # List keymap in bash
 +</code>
 +
 +===== zsh Other =====
 +
 +<code>
 +bindkey  # List keymap in zsh for main (emacs/viins)
 +zle -al  # List of all commands to use in bindings
 +bindkey -e  # emacs mode
 +bindkey -v  # vi mode
 +</code>
  
bash.1772393176.txt.gz · Last modified: by reddy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki