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