-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
cowsay: fix commands for zsh #5742
Conversation
Works fine for me 🤔 tested in unames:
Linux **** 5.11.13-arch1-1 #1 SMP PREEMPT Sat, 10 Apr 2021 20:47:14 +0000 x86_64 GNU/Linux
Linux **** 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux $ cowsay -f dragon hello! 10:27:12
________
< hello! >
--------
\ / \ //\
\ |\___/| / \// \\
/0 0 \__ / // | \ \
/ / \/_/ // | \ \
@_^_@'/ \/_ // | \ \
//_^_/ \/_ // | \ \
( //) | \/// | \ \
( / /) _|_ / ) // | \ _\
( // /) '/,_ _ _/ ( ; -. | _ _\.-~ .-~~~^-.
(( / / )) ,-{ _ `-.|.-~-. .~ `.
(( // / )) '/\ / ~-. _ .-~ .-~^-. \
(( /// )) `. { } / \ \
(( / )) .----~-.\ \-' .~ \ `. \^-.
///.----..> \ _ -~ `. ^-` ^-_
///-._ _ _ _ _ _ _}^ - - - - ~ ~-- ,.-~
/.-~ |
Thank you @Waples for testing. 👍 |
Fix commands that fail with zsh due to missing escaping for the exclamation mark: $ cowsay -f dragon "Hello!" dquote> $ uname -a Darwin **** 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64 $ echo $SHELL /bin/zsh $ cowsay -h cow{say,think} version 3.03, (c) 1999 Tony Monroe Usage: cowsay [-bdgpstwy] [-h] [-e eyes] [-f cowfile] [-l] [-n] [-T tongue] [-W wrapcolumn] [message]
7d286e8
to
559893b
Compare
Commit 06b6a5e fixes commands for |
Can confirm. |
(I did a |
pages/common/cowsay.md
Outdated
@@ -3,22 +3,22 @@ | |||
> Generate an ASCII character (by default a cow) saying or thinking something. | |||
> More information: <https://github.com/tnalpgge/rank-amateur-cowsay>. | |||
|
|||
- Print an ASCII cow saying "Hello world!": | |||
- Print an ASCII cow saying "Hello world\!": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fails with zsh
(but I forgot to change for single quotes like other examples). 😇
Can we just remove the |
That would be the easy way 😄. |
That's cheating. https://en.wikipedia.org/wiki/%22Hello,_World!%22_program 😉 Why not? I don't care but the current fix ( |
How about we leave everything as is and add
to the command description? But then I'm wondering if that's even worth it. |
IMHO, it's better to choose a simple example that works for all shells (I like |
I think we should keep the examples as generic as possible and since |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there! I've got a minor suggestion below, but in terms of the exclamation merk issue I recommend that we remove the exclamation mark altogether. It can also pose an issue in Bash depending on the configuration of the shell if not quotes.
In tldr pages we aim for simplicity, and it sounds like including the exclamation mark would increase the complexity of the page.
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
@nicokosi I think we should move back to double quotes too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_______
< LGTM! >
-------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Fix commands that fail with
zsh
due to missing escaping for the exclamation mark: