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

Re: VCS info (Re: Call for good plugins list)



Bart Schaefer wrote on Sun, 01 Oct 2017 14:50 -0700:
> autoload -Uz add-zsh-hook
> autoload -Uz vcs_info
> 
> vcs-info-v() { vcs_info; RPS1="$vcs_info_msg_0_" }
> add-zsh-hook precmd vcs-info-v

I don't use promptsubst either:

_precmd_vcs_info () {
	vcs_info
	[[ -n ${vcs_info_msg_0_} ]] && {
		print
		print -Plr -- ${vcs_info_msg_0_} ${vcs_info_msg_1_}
	}
}

> I did borrow somebody's (yours?) +vi-git-post-backend-updown hook, but

I posted it once, but it had been added to vcs_info-examples before then.



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