Topic: https://brettterpstra.com/2014/05/10/bash-and-dash/
hide preview

What's next? verify your email address for reply notifications!

Brian Cerveny 10y, 312d ago

In Dash 2 I had to change dash://man:$* to dash://manpages:$*

Thanks! This is a tip I will use daily.

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 10y, 312d ago

I probably shortened the shortcut and forgot, I do that with all of my docsets. Ruby is rb:, JavaScript is js:, etc. I recommend it :).

hide preview

What's next? verify your email address for reply notifications!

kavu 10y, 313d ago

If you change the bash special parameter `$@` to `$*` you won't need the urlencoding command substitution.

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 10y, 313d ago

you're right (just tried it) but why? What's the difference in the output between them?

remark link parent
hide preview

What's next? verify your email address for reply notifications!

kavu 10y, 313d ago

When `$@` is in double quotes the arguments are split on the first character of IFS (by default a space) and each argument is individually quoted, but with `$*` in double quotes no word splitting occurs and the entire string of arguments is quoted. URLs are one of the few times that it is preferable to use`$*` than `$@`.

These 2 sites have everything there is to know about *good* bash scripting:

1. http://wiki.bash-hackers.org
2. http://mywiki.wooledge.org (Bash Guide, Bash Pitfalls and Bash FAQ)

Bash LaunchBar search template:

https://www.google.com/sear...

remark link parent
hide preview

What's next? verify your email address for reply notifications!

ttscoff 10y, 313d ago

Thanks!

hide preview

What's next? verify your email address for reply notifications!