diff options
| author | Teddy Wing | 2017-10-04 22:55:55 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-10-04 22:55:55 +0200 | 
| commit | 357eb2484bf58ed202b072b94fff54d81fe0fb49 (patch) | |
| tree | 68d3b5c4add67ae6206d7a1224f8565d29c5f16d /qcd.bash-completion | |
| parent | d72c0c18af130dac31329bdafb08a8ea48b0a669 (diff) | |
| download | qcd-357eb2484bf58ed202b072b94fff54d81fe0fb49.tar.bz2 | |
qcd: Update slash-escapes in change command for Bash 4
I was getting this error when running `qcd`'s change command on a
machine using Bash 4.4.12:
    $ sed -E "s/^shortcut       .+$/shortcut    ${p//\//\/}/" .config/qcd/database
    sed: 1: "s/^shortcut	.+$/shortcut ...": bad flag in substitute command: 'U'
The solution, as described here:
https://stackoverflow.com/questions/27787536/how-to-pass-a-variable-containing-slashes-to-sed/27788661#27788661
is to add an extra backslash to the parameter expansion. This appears to
work on both Bash 3 and 4 in my local manual tests.
Diffstat (limited to 'qcd.bash-completion')
0 files changed, 0 insertions, 0 deletions
