Erwin Müller

Mis­cel­la­neous Bash Alias­es & Con­fig­u­ra­tion

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 start­up.

Ref­er­ences:

alias em='emacsclient -nw'

Re­move not need­ed Dock­er con­tain­ers.

For ex­am­ple:

docker_rm_search Exited
function docker_rm_search() {
  p="$1"
  docker rm -f $(docker ps -a | grep "$p" | awk "{print \$1}")
}

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

Ref­er­ences:

function mvn() {
  /usr/bin/mvn -T 1C "$@"
  local ret=$?
  if [[ $ret == 0 ]]; then
    notify-send --icon=dialog-information -u normal -c mvn "Done Maven: $*"
  else
    notify-send --icon=dialog-error -u normal -c mvn "Error: $ret Maven: $*"
  fi
}

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

Ref­er­ence:

;; enable spellcheck per default for all files
;; see https://stackoverflow.com/questions/15891808/how-to-enable-automatic-spell-check-by-default
(add-hook 'find-file-hooks 'turn-on-flyspell)

Leave a Reply

Your email address will not be published. Required fields are marked *