User Tools

Site Tools


docs:tips_n_tricks:bash.html

bash

Dont keep edits in history (as zsh does)

History operations

Save history without exiting bash

history -A

Show history with full timestamps

HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S ' history

Undo edits in history

M-r (or ESC,r) Restore last version
erase line and press ENTER
C-x,C-u Undo last key
C-_
C-/

References:

Bash Prompt

Linux

Android

export PS1='${HOSTNAME}:${PWD: -$((COLUMNS/2))} \$ '
docs/tips_n_tricks/bash.html.txt · Last modified: 10.10.2024 15:53 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki