mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2142 (markdown)
@@ -19,4 +19,9 @@ Aliases just substitute the start of a command with something else. They therefo
|
||||
|
||||
### Exceptions
|
||||
|
||||
If your alias ends up quoting the value, e.g. `alias cut_first="awk '{print \$1}'"`, you can technically [[ignore]] this error. However, you should consider turning this alias into a more readable function instead: `cut_first() { awk '{print $1}' "$@"; }`
|
||||
If your alias ends up quoting the value, e.g. `alias cut_first="awk '{print \$1}'"`, you can technically [[ignore]] this error. However, you should consider turning this alias into a more readable function instead: `cut_first() { awk '{print $1}' "$@"; }`
|
||||
|
||||
### Related resources:
|
||||
|
||||
* [BashFaq: How can I make an alias that takes an argument?](https://mywiki.wooledge.org/BashFAQ/080)
|
||||
* [StackOverflow: Make a Bash alias that takes a parameter?](https://stackoverflow.com/questions/7131670/make-a-bash-alias-that-takes-a-parameter)
|
Reference in New Issue
Block a user