From 5c300009caf855edfceda68d9116c997ce82f2d7 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 18 Jan 2013 14:40:00 +0900 Subject: [PATCH] do not add alias when command not found --- bashrc | 8 ++++---- emacs.el | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bashrc b/bashrc index 83c8bbb..38aaac4 100755 --- a/bashrc +++ b/bashrc @@ -146,10 +146,10 @@ null type e3em && alias e3=e3em #alias dirs="dirs -v -l | \grep -v \$(printf '%s$' \$PWD)" alias po=popd alias pu=pushd -alias sudo="sudo " # use aliases through sudo -alias sudoe="sudoedit" -alias halt="sudo halt" -alias reboot="sudo reboot" +null type sudo && alias sudo="sudo " # use aliases through sudo +null type sudoedit && alias sudoe="sudoedit" +null type halt && alias halt="sudo halt" +null type reboot && alias reboot="sudo reboot" null type dbus-send && { alias suspend="dbus-send --system --print-reply --dest=org.freedesktop.UPower \ /org/freedesktop/UPower org.freedesktop.UPower.Suspend" diff --git a/emacs.el b/emacs.el index a761385..c7cc6f7 100644 --- a/emacs.el +++ b/emacs.el @@ -360,13 +360,15 @@ found, otherwise returns nil." trailing ; trailing blanks newline ; newlines newline-mark ; use display table for newline + tab-mark empty ; empty lines at beg or end of buffer lines-tail ; lines over 80 )) ;; (setq whitespace-newline 'font-lock-comment-face) (add-to-list 'whitespace-display-mappings - `(newline-mark ?\n ,(vconcat "$\n")) - ) + `(newline-mark ?\n ,(vconcat "$\n"))) + (add-to-list 'whitespace-display-mappings ; not work + `(tab-mark ?\t ,(vconcat "^I\t"))) (global-whitespace-mode t) (when (eq (display-color-cells) 256)