News for hackers. Stuff that matters.
Re:Escaping strings in Bash using !:q by eMSF on Friday October 02, 2020 @07:06AM (#24661333)
Seeing the result of a modified history expansion is (or was) kind of a desired feature, so it's built-in just like the ability to escape stuff with :q

    $ # here be quote ' " chars

  (use :p to print but not execute)
    $ :!q:p
    '# here be quote '\'' " chars'

  (use :s to modify – no :q here because we modify the already quoted text !!, unquoted is now !-2)
    $ !:s/be/are/:p
    '# here are quote '\'' " chars'

There are no comments on this comment yet.