A stray "j" ruined my evening
4 hours ago
- #debugging
- #shell-scripting
- #terminal-tools
- Created a simple link shortener script called 'shirts' using shell, curl, and wl-clipboard.
- Encountered issues when sharing shortened links via Signal TUI (gurk), where URLs ended with a stray 'j'.
- Discovered that the problem was due to a newline character being copied with the link, which ANSI translates to 'j'.
- Found a solution by using jq's --join-output (-j) flag to avoid adding newlines when copying.
- Emphasized the learning experience from terminal quirks and control codes, citing resources on ANSI escape sequences.