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

Re: view onto command pipeline?



On Sat, Jul 16, 2022, at 5:30 PM, Bart Schaefer wrote:
> You need to look at the preexec hook.

Ah, many thanks Bart!  Much appreciated.  Don't know how I missed that.

For the record, I used just the following, and it works great. 

git () {
        local opts=() 
        if [[ -o interactive && ( -t 1 || -n $pager ) ]]
        then
                opts=(-c color.ui=always) 
        fi
        command git $opts $@
}




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