Why do backslashes prevent alias expansion?

后端 未结 3 525
庸人自扰
庸人自扰 2020-12-28 15:53

In the first part of my question I will provide some background info as a service to the community. The second part contains the actual question.

Part I

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-28 16:28

    Historically, and maintained by POSIX, quoting any part of the word causes the entire word to be considered quoted for the purposes of functions and alias expansion. It also applies to quoting the end token for a here document:

    cat << \EOF
    this $text is fully quoted
    EOF
    

提交回复
热议问题