Teach fish to compute the length of more escape sequences.

Fixes #1243
Fix fish_config error with python3

Closes #1253.