From 05672729135cbae1e6ce2ed92ded8348d6c6b344 Mon Sep 17 00:00:00 2001 From: hjp Date: Thu, 27 Jul 1995 08:20:11 +0000 Subject: [PATCH] Defined all functions in .zshrc now. --- .zshrc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index c022613..4cf6dfc 100644 --- a/.zshrc +++ b/.zshrc @@ -19,7 +19,27 @@ alias la='ls -alsF' alias lc='ls -l *.c' alias ts='tail /usr/spool/mqueue/syslog' alias train='pd ~/wrk/mars/train' -typeset -fu namedir xvi pd setenv + +namedir(){ + $1=~+ + : ~$1 +} + +pd(){ + if [[ $# = 0 ]] + then + pushd +1 + else + pushd "$@" + fi + namedir `basename $PWD | tr -cd 'A-Za-z0-9'` +} + +setenv(){ + $1=$2 + export $1 +} + cls() { clear; true } if [[ "$SHLVL" = 1 ]]