• 0 Posts
  • 4 Comments
Joined 1 year ago
cake
Cake day: October 16th, 2024

help-circle
  • Crestwave@lemmy.worldtoBash@lemmy.mlpathway mtu discovery bash script
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    8 months ago

    Some stylistic notes

    • The head -1 syntax is obsolete in POSIX, replaced by head -n 1.
    • for filename in $(ls) is inefficient and will break on whitespace. You can use shell globbing for this instead, e.g., for filename in *.
    • A lot of the variables seem to be inconsistently quoted. I recommend running ShellCheck on it, as this can be dangerous (if you set TMPDIR to /tmp/ dir, I believe it will remove /tmp and dir)

  • Most terminal emulators are in fact slow and they can be a huge bottleneck if you run complex TUIs or workloads that print a lot of output.

    Ever written a program that was extremely slow only for it to run instantly after removing your debug print statements? That’s because your terminal is slow.

    Fast terminal emulators already exist, but they notably refused to add tabs/splits and overall tended to be quite janky. Ghostty merging these features may not be the most groundbreaking innovation, but a high quality piece of software that can drop-in replace something you use daily with some cool improvements is something to be excited about to me. :-)