1. zpy: Zsh helpers for Python venvs, with pip-tools
  2. dua: View disk space usage and delete unwanted data, fast

Article of the week: The Forgotten History of the Blinking Cursor

“I remember him telling me the reason behind the blinking cursor, and it was simple,” Kiesling’s son writes. “He said there was nothing on the screen to let you know where the cursor was in the first place. So he wrote up the code for it so he would know where he was ready to type on the Cathode Ray Tube.”

Tip of the week: POSIX has getopt and Bash has getopts, but both only support single dash arguments. For more robust argument handling, try zparseopts in your scripts:

% cat << 'EOF' > zparse.zsh
#!/usr/bin/env zsh
zparseopts -- f:=foo -foo:=foo b:=bar -bar:=bar
[[ -n $foo ]] && echo "you passed ${foo[2]}"
[[ -n $bar ]] && echo "you passed ${bar[2]}"
EOF

% ./zparse.zsh --foo var1 --bar var2
you passed var1
you passed var2

% ./zparse.zsh -f one -b two
you passed one
you passed two

% ./zparse.zsh --foo apple
you passed apple

To read about all the different options available, see run-help zshmodules.