Both sides previous revision Previous revision Next revision | Previous revision |
development:bash_shortcuts [2022/03/18 21:35] – aziz | development:bash_shortcuts [2022/06/15 14:39] (current) – aziz |
---|
{{tag>bash shortcuts}} | {{tag>bash shortcuts}} |
| ====== Bash shortcuts ====== |
| |
| ^ Shortcut ^ Command ^ |
| | ''Ctrl'' + ''a'' | Go to the beginning of line. | |
| | ''Ctrl'' + ''e'' | Go to the end of line. | |
| | ''Ctrl'' + ''_'' | Undo | |
| | '':up:'' or ''Ctrl'' + ''p'' | Previous command | |
| | ''Ctrl'' + ''r'' | Search previous command | |
| | ''Ctrl'' + ''x'', ''Ctrl'' + ''e'' | Open editor to edit the current command | |
| | ''Ctrl'' + ''k'' | Cut from cursor to end of line | |
| | ''Ctrl'' + ''u'' | Cut from cursor to beginning of line | |
| | ''Ctrl'' + ''y'' | Paste | |
| |
| ====== Bash aliases ====== |
| |
| ^ Shortcut ^ Command ^ |
| | ll | long listing | |
| | la | long listing, inclunding hidden files | |
| | dcu | start containers. must be in a dir with a docker-compose.yml file | |
| | dcd | stop containers. must be in a dir with a docker-compose.yml file | |
| | ta | tmux attach | |
| | gis | git status | |
| | git | git log | |
| | git | git log | |
| |
^ Shortcut ^ Command ^ | |
| ''Ctrl'' + ''a'' | Go to the beginning of line. | | |
| ''Ctrl'' + ''e'' | Go to the end of line. | | |
| ''Ctrl'' + ''_'' | Undo | | |
| '':up:'' or ''Ctrl'' + ''p'' | Previous command | | |
| ''Ctrl'' + ''r'' | Search previous command | | |
| ''Ctrl'' + ''x'', ''Ctrl'' + ''e'' | Open editor to edit the current command | | |
| ''Ctrl'' + ''k'' | Cut from cursor to end of line | | |
| ''Ctrl'' + ''u'' | Cut from cursor to beginning of line | | |
| ''Ctrl'' + ''y'' | Paste | | |
| |
See: | See: |
| |
* [[https://blog.ssdnodes.com/blog/cheatsheet-bash-shortcuts/|Bash Cheatsheet]] | * [[https://blog.ssdnodes.com/blog/cheatsheet-bash-shortcuts/|Bash Cheatsheet]] |
* <code>bind -P | grep "can be found" | sort | awk '{printf "%-40s", $1} {for(i=6;i<=NF;i++){printf "%s ", $i}{printf"\n"}}'</code> | * <code -> |
* <code>man bash</code> | bind -P | grep "can be found" | sort | awk '{printf "%-40s", $1} {for(i=6;i<=NF;i++){printf "%s ", $i}{printf"\n"}}' |
| </code> |
| * <code -> |
| man bash |
| </code> |
| |
| |