-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs += zsh function that eval's a code snippet on various zsh versions? #24
Comments
Sounds good to me, though at the moment they're personal functions and they're adapted very specifically to how I work. Let me post here the documentation for each one and you can adapt it yourself if you need.
|
Thanks a lot for the go-head and for the docstrings, Marc!
I haven't got much to say about the high-level functionality here
(I don't even have docker installed currently), but one drive-by point:
Oh, one last thing: the way the output is printed depends on mode 1 or
mode 2. **Mode 1** is optimized so that the version is shown in a
single line, and the rest is the Docker output. The last empty prompt
line is cleared with `printf '\r\e[2K'`.
One possible change here — which you might want to pick up for your
dotfiles as well — would be to use ${terminfo} and ${colors} (or «print
-P») rather than hardcode escape sequences. I'm not sure what \e[2K is,
but \e[K and and \e[1K are respectively ${terminfo[el]} and
${terminfo[el1]} on my system, so one of those might work.
Thanks again :)
|
That's pretty nice, maybe it would be worth creating a separate project for these functions ? |
@mcornella posted on https://www.zsh.org/workers/49600 a code snippet for quickly eval'ing a string on various zsh versions:
https://github.com/mcornella/dotfiles/blob/4bf802f6/functions#L78-L118
It might be useful to link that from the documentation here? Or perhaps even copy it into this repository (changing the default value of
$image
in the last two functions in the process), if Marc gives us permission?The text was updated successfully, but these errors were encountered: