#! /bin/sed -f
# Put the indentation in hold space
/:$/ {
h
s,\.:,,
s,[^/:]*[/:], ,g
x
}
# Add the indentation in front of the line
G
s:\(.*\)\n\(.*\):\2\1:
### colorized by sedsed, a debugger and code formatter for sed scripts
### original script: http://sed.sf.net/grabbag/scripts/indentls.sed