legacy-dotfiles/zsh/functions/shorten-dir
2014-07-01 22:53:27 +02:00

6 lines
128 B
Bash

# -*- mode: sh; -*-
autoload -U regexp-replace
local curdir=$1
regexp-replace curdir '(\.?[^./])[^/]+/' '$match/'
echo $curdir