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

Re: Completing all possible candidates



On Jan 15,  8:28am, Jesper Nygårds wrote:
}
} _my-prev-result() {
}     local hstring
}     if [[ $WIDGET = *-all-* ]]; then
}         compstate[insert]=all
}     fi
}     # Run last command again, save output in hstring
}     hstring=$(eval $(fc -l -n -1))

You probably ought to put double quotes around the inner $(...), because
without them in that context it's subject to word splitting and then the
eval will split the resulting words again.

}     # Split items on new-line into an array, quote each item
}     compadd - ${(@f)hstring}
} }

I'm glad the example worked well for you.



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