gordonfish | basheval: printf '[%s]' "$var" $'foo \x27bar\x27 baz' # This can be nicer than '\'' or '"'"' |
perlbot | gordonfish: [][foo 'bar' baz] |
gordonfish | oops |
gordonfish | basheval: printf '[%s]' $'foo \x27bar\x27 baz' |
perlbot | gordonfish: [foo 'bar' baz] |
gordonfish | Re: <thrig> well you can write '...' then fix up any inner ' to '\'' # Re: <huf> there's $'' at least |
huf | it can do \' |
huf | that's the entire point |
huf | it also does \n |
huf | so you know, you can't win |
gordonfish | Yeah I know about \n and \t, I forgot that \' was legal, as in a normal '...' that doesn't work. Good point, thanks. |
huf | the tragedy is that you don't have a normal shell '' with switchable delimiters |
huf | and so on |
huf | instead we get this... |
gordonfish | the tragedy of darth delimiter the daft |
Grinnz | mst: bash already lets you use '' for one bit and "" for another :P |
mst | Grinnz: ... yes? |
Grinnz | no need for a second -e |
mst | I can do '...'"..."'...' true |
mst | but multiple -es skim reads easier |
Grinnz | what do you mean, surely bash quoting rules are eminently readable and consistent with everything else! |
xenu | if you think bash is inconsistent, try using tcsh |
ttkp | every time I try to work on my own perl shell thinger, I get hung up on parsing .. but maybe adding a few convenience functions to my repl would help as a stopgap |
mst | Grinnz: give a man a fish and he'll be confused for a day. teach a man to fish and he'll bash his head against other people's scripts for the rest of his life |
guestkato | so you're saying order the chicken(scheme) |
mst | guestkato: your plan may not be cunning but it is not without guile |
thrig | guile? is that your scheme |
LeoNerd | I hear it gets a good rep |
mst | thrig: no need to accuse me of running a racket |