port some custem/* from lxzsh