From 0d70f1dc57a7aeaba7a4977ccaccfd44a3722517 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 1 Jul 2014 22:53:27 +0200 Subject: Update zsh --- zsh/functions/shorten-dir | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 zsh/functions/shorten-dir (limited to 'zsh/functions/shorten-dir') diff --git a/zsh/functions/shorten-dir b/zsh/functions/shorten-dir new file mode 100644 index 0000000..a630971 --- /dev/null +++ b/zsh/functions/shorten-dir @@ -0,0 +1,6 @@ +# -*- mode: sh; -*- +autoload -U regexp-replace + +local curdir=$1 +regexp-replace curdir '(\.?[^./])[^/]+/' '$match/' +echo $curdir -- cgit v1.3-2-g0d8e