Hacker News new | ask | show | jobs
by ink_13 475 days ago
I set it to backtick (`)

No need for that character 99% of the time, and hitting two in a row will still send it anyway

2 comments

this is the way.

also works great in combination with `set -g base-index 1` so that switching between the first 9 windows can be done naturally, with `-1, `-2, etc.

I use backticks in shell scripts all the time. Meanwhile, I've never had a legit use for: Ctrl-y so that's my tmux escape.
I don't intend this to yuck your yum, but if you haven't seen it shellcheck advises against backticks because they don't nest unlike $(basename $(dirname "...")) along with some other edge cases https://www.shellcheck.net/wiki/SC2006#rationale and https://mywiki.wooledge.org/BashFAQ/082
I find most of shellcheck's opinions quite arbitrary.

Wider shell compatibility is a good reason to use backticks. Avoiding nesting is always possible. Quoting may be a concern in more complex usage. But yes, I know well, and often also use $( ) syntax.

Making a lot of noise about use of (the shellcheck author's) non-preferred syntax, which works perfectly fine in a given context, is a design flaw that renders shellcheck useless to me. I'm perfectly capable of finding an opinionated pedant on my own who will also critize the syntax I use (with little or no justification), and offer no actual help...