You're right. It seems to work when you're not using the bash-completion package. If you do however, then it's still broken.
I'm not sure yet wether it's a quoting problem or a genuine bug in bash:
mika@arthur:~/rrr(1)$ compgen -f "1\'" 1'2 2 1'1 1 mika@arthur:~/rrr$ compgen -f "1\'2" mika@arthur:~/rrr(1)$ compgen -f "1\\'2" mika@arthur:~/rrr(1)$ compgen -f "1\\\'2" mika@arthur:~/rrr(1)$ compgen -f "1\\\\'2" mika@arthur:~/rrr(1)$ compgen -f "1\\\\\'2" 1'2 2
You're right. It seems to work when you're not using the bash-completion package. If you do however, then it's still broken.
I'm not sure yet wether it's a quoting problem or a genuine bug in bash:
mika@arthur: ~/rrr(1) $ compgen -f "1\'" ~/rrr(1) $ compgen -f "1\\'2" ~/rrr(1) $ compgen -f "1\\\'2" ~/rrr(1) $ compgen -f "1\\\\'2" ~/rrr(1) $ compgen -f "1\\\\\'2"
1'2 2
1'1 1
mika@arthur:~/rrr$ compgen -f "1\'2"
mika@arthur:
mika@arthur:
mika@arthur:
mika@arthur:
1'2 2