From 3ed8265e2873c999b494257aa160ff4d4e657656 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 15 Apr 2012 10:31:53 -0400 Subject: [PATCH] [#145] Do not depend on the alias module --- modules/utility/init.zsh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 130e112..1fc15e1 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -7,9 +7,6 @@ # Sorin Ionescu # -# Load dependencies. -omodload 'alias' - # Serves a directory via HTTP. alias http-serve='python -m SimpleHTTPServer' @@ -23,22 +20,22 @@ function mkdcd { compdef '_path_files -/' mkdcd 2> /dev/null # Changes to a directory and lists its contents. -function cdll { - builtin cd "$1" && ll +function cdls { + builtin cd "$argv[-1]" && ls "${(@)argv[1,-2]}" } -compdef _cd cdll 2> /dev/null +compdef _cd cdls 2> /dev/null # Pushes an entry onto the directory stack and lists its contents. -function pushdll { - builtin pushd "$1" && ll +function pushdls { + builtin pushd "$argv[-1]" && ls "${(@)argv[1,-2]}" } -compdef _cd pushdll 2> /dev/null +compdef _cd pushdls 2> /dev/null # Pops an entry off the directory stack and lists its contents. -function popdll { - builtin popd "$1" && ll +function popdls { + builtin popd "$argv[-1]" && ls "${(@)argv[1,-2]}" } -compdef _cd popdll 2> /dev/null +compdef _cd popdls 2> /dev/null # Prints columns 1 2 3 ... n. function slit {