Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Stomping precmd (not) (Re: PATCH: promptinit)



On Oct 15,  1:47pm, Adam Spiers wrote:
} Subject: Re: PATCH: promptinit
}
} Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
} > Also, I really don't like having my precmd stomped on, but I haven't yet
} > gotten around to fixing that.
} 
} Yep ... bash2zshprompt is fundamentally flawed

Just a thought in passing:

    function addprecmd {
	if (($+precmd_hooks == 0)); then
	    eval function pre_addprecmd_precmd "$(functions precmd)"
	    precmd_hooks=(pre_addprecmd_precmd)
	    function precmd {
		local f
		for f in "${precmd_hooks[@]}"; do $f; done
	    }
	fi
	precmd_hooks[$#precmd_hooks+1]=("$@")
    }

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author