]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
shell/aliases: move some commands from zsh/rc
authorSimon Ruderich <simon@ruderich.org>
Mon, 9 Jun 2014 12:42:29 +0000 (14:42 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 10 Jun 2014 17:58:19 +0000 (19:58 +0200)
shell/aliases.in
zsh/rc

index 02958dad1dcd82dcb9db932e8f92cf9549df1a28..73f30ea4faaeca2af8153b993ee67f4899364cd4 100644 (file)
@@ -98,4 +98,14 @@ df() {
 # Highlight matched strings. Doesn't work with a pager!
 alias grep='grep --color=auto'
 
+# Pipe output through less.
+tree() {
+    command tree -C "$@" | less
+}
+
+# Better viewer for info pages .. just pipe everything into less.
+info() {
+    command info "$@" 2>/dev/null | less
+}
+
 # vim: ft=sh
diff --git a/zsh/rc b/zsh/rc
index 666f40ef3a91569a8aaebd11d61abe35e0e6d231..18c66952e56b0599fc8a481b046bb775358e065b 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -865,11 +865,6 @@ fi
     command tig --max-count=200 --branches --remotes --tags "$@"
 }
 
-# Pipe output through less.
-(( $+commands[tree] )) && tree() {
-    command tree -C "$@" | less
-}
-
 # Choose the "best" PDF viewer available: xpdf, then zathura (in the past
 # zathura was preferred, but recent versions are completely broken: still no
 # working search and no page-wise scrolling anymore). Also setup completion
@@ -889,11 +884,6 @@ elif (( $+commands[zathura] )); then
     compdef pdf=xpdf
 fi
 
-# Better viewer for info pages .. just pipe everything into less.
-info() {
-    command info "$@" 2>/dev/null | less
-}
-
 
 # OS SPECIFIC SETTINGS