legacy-dotfiles/zsh/.zsh/functions/shorten-dir
2014-08-21 00:14:54 +02:00

6 lines
128 B
Bash

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