3 deleted 201 characters in body
source | link

NOTE: Stéphane Chazelas's answer is better than this (as are several others) but this was the first correct answer (probably by less than a minute) so feel free to give it some love 😉


A now-deleted comment tipped me off and got me half-way to the answer.

It's impossible to escape a single quote inside a single-quoted string.

This limitation is not present in double quoted strings, as I'm certainly escaping a single quotation mark inside a double-quoted string in my final solution:

alias shopt="echo You\'re looking for setopt. This is Z shell, man, not Bash."

NOTE: Stéphane Chazelas's answer is better than this (as are several others) but this was the first correct answer (probably by less than a minute) so feel free to give it some love 😉


A now-deleted comment tipped me off and got me half-way to the answer.

It's impossible to escape a single quote inside a single-quoted string.

This limitation is not present in double quoted strings, as I'm certainly escaping a single quotation mark inside a double-quoted string in my final solution:

alias shopt="echo You\'re looking for setopt. This is Z shell, man, not Bash."

A now-deleted comment tipped me off and got me half-way to the answer.

It's impossible to escape a single quote inside a single-quoted string.

This limitation is not present in double quoted strings, as I'm certainly escaping a single quotation mark inside a double-quoted string in my final solution:

alias shopt="echo You\'re looking for setopt. This is Z shell, man, not Bash."
2 added 169 characters in body
source | link

NOTE: Stéphane Chazelas's answer is better than this (as are several others) but this was the first correct answer (probably by less than a minute) so feel free to give it some love 😉


A now-deleted comment tipped me off and got me half-way to the answer.

It's impossible to escape a single quote inside a single-quoted string.

This limitation is not present in double quoted strings, as I'm certainly escaping a single quotation mark inside a double-quoted string in my final solution:

alias shopt="echo You\'re looking for setopt. This is Z shell, man, not Bash."

A now-deleted comment tipped me off and got me half-way to the answer.

It's impossible to escape a single quote inside a single-quoted string.

This limitation is not present in double quoted strings, as I'm certainly escaping a single quotation mark inside a double-quoted string in my final solution:

alias shopt="echo You\'re looking for setopt. This is Z shell, man, not Bash."

NOTE: Stéphane Chazelas's answer is better than this (as are several others) but this was the first correct answer (probably by less than a minute) so feel free to give it some love 😉


A now-deleted comment tipped me off and got me half-way to the answer.

It's impossible to escape a single quote inside a single-quoted string.

This limitation is not present in double quoted strings, as I'm certainly escaping a single quotation mark inside a double-quoted string in my final solution:

alias shopt="echo You\'re looking for setopt. This is Z shell, man, not Bash."
1
source | link

A now-deleted comment tipped me off and got me half-way to the answer.

It's impossible to escape a single quote inside a single-quoted string.

This limitation is not present in double quoted strings, as I'm certainly escaping a single quotation mark inside a double-quoted string in my final solution:

alias shopt="echo You\'re looking for setopt. This is Z shell, man, not Bash."