From 54b5293f4d7efa03e3bf17911176d933977432d9 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Mon, 10 Sep 2018 19:13:01 +0900 Subject: [PATCH] Add safe_lolcat --- emacs.el | 5 +++++ shrc | 15 +++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index 50047f6..2d7ac40 100644 --- a/emacs.el +++ b/emacs.el @@ -714,6 +714,11 @@ found, otherwise returns nil." (when (safe-require-or-eval 'autosave) (autosave-set 8)) + +;; bookmarks + +(define-key ctl-x-map "m" 'list-bookmarks) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; buffer killing diff --git a/shrc b/shrc index af5c625..be4d84f 100755 --- a/shrc +++ b/shrc @@ -184,17 +184,24 @@ fi ###################### # Print welcome messages +if command -v lolcat >/dev/null +then + alias __safe_lolcat=lolcat +else + alias __safe_lolcat=cat +fi + command -v fortune >/dev/null && { if command -v cowsay >/dev/null then - fortune | cowsay + fortune | cowsay | __safe_lolcat echo - fortune -o | cowsay + fortune -o | cowsay | __safe_lolcat echo else - fortune + fortune | __safe_lolcat echo - fortune -o + fortune -o | __safe_lolcat echo fi }