Skip to content

Instantly share code, notes, and snippets.

@ifiokjr
Last active November 12, 2021 05:17
Show Gist options
  • Select an option

  • Save ifiokjr/46bc705cd6c8d5eb04878161350fae25 to your computer and use it in GitHub Desktop.

Select an option

Save ifiokjr/46bc705cd6c8d5eb04878161350fae25 to your computer and use it in GitHub Desktop.
thoughts-as-i-code

Bugs

I tend to forget the bugs that I stumble across while writing code. Sometimes I'll fix a bug and a few minutes later come across a similar issue and not remember how I fixed the previous one.

I'll try documenting the bugs as I find them and hopefully fix them also.

${var:-value}

Today I bumped into this syntax and didn't know what it meant.

${CARGO:-cargo}

I googled around for a bit and found this answer.

Basically this means if the environment variable CARGO is set to anything (except for an empty string), use it, otherwise use cargo.

"$@"

All the parameters passed to the script.

For the following script

./run awesome things

$@ is equal to awesome things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment