Erwin Müller

Mis­cel­la­neous Bash Alias­es & Configuration

Use an alias to open Emacs in­side the con­sole. We will use the Emacs-Client to con­nect to a Emacs serv­er for faster startup.


[shell] alias em=’emacsclient ‑nw’ [/shell]

Re­move not need­ed Dock­er containers.

For ex­am­ple:

docker_rm_search Exited
[shell] func­tion docker_rm_search() { p=“$1” dock­er rm ‑f $(dock­er ps ‑a | grep “$p” | awk “{print \$1}”) } [/shell]

Use no­ti­fy-send to in­form the user when maven is done. 


[shell] func­tion mvn() { /usr/bin/mvn ‑T 1C “$@” lo­cal ret=$? if [[ $ret == 0 ]]; then no­ti­fy-send –icon=dialog-information ‑u nor­mal ‑c mvn “Done Maven: $*” else no­ti­fy-send –icon=dialog-error ‑u nor­mal ‑c mvn “Er­ror: $ret Maven: $*” fi } [/shell]

En­able au­to­mat­ic spelling for Emacs.


[plain] ;; en­able spellcheck per de­fault for all files ;; see https://​stack​over​flow​.com/​q​u​e​s​t​i​o​n​s​/​1​5​8​9​1​8​0​8​/​h​o​w​-​t​o​-​e​n​a​b​l​e​-​a​u​t​o​m​a​t​i​c​-​s​p​e​l​l​-​c​h​e​c​k​-​b​y​-​d​e​f​a​ult (add-hook ‘find-file-hooks ‘turn-on-fly­spell) [/plain]

Leave a Reply

Your email address will not be published.