Skip to content

Instantly share code, notes, and snippets.

@jpcofr
Created February 15, 2025 08:58
Show Gist options
  • Save jpcofr/34f213c957213b1bf077ad1dbf1ffe4a to your computer and use it in GitHub Desktop.
Save jpcofr/34f213c957213b1bf077ad1dbf1ffe4a to your computer and use it in GitHub Desktop.
Terminal Ligature Test
#!/bin/sh
# Terminal Ligature Test
# This one-liner checks if the terminal (not the code editor) renders ligatures correctly.
# It compiles a simple C++ program that prints common ligature-sensitive operators.
echo -e '#include <cstdio>\nint main(){const char*s="-> <= >= != == && || << >>";while(*s)putchar(*s++);return 0;}' | gcc -x c++ - -o /tmp/a.out && /tmp/a.out; rm /tmp/a.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment