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