Wesley Schwengle IncludeIf: A digital space written in pencil

Freelance contracter & slacker

GitLab Codeberg Debian Perl npm LinkedIn Mastodon

Latest posts

Latest Article

Living on the edge: truncating the path on your PS1

Published: March 10, 2026 (Updated: March 18, 2026)

TL;DR

I didn’t like how the default zsh prompt truncation works. My solution, used in my own custom-made prompt (fully supported by promptinit), uses a custom precmd hook to dynamically determine the terminal’s available width.

Instead of blind chopping, my custom logic ensures human-readable truncation by following simple rules: it always preserves the home directory (∼) and the current directory name, only removing or shortening non-critical segments in the middle to keep the PS1 clean, contextual, and perfectly single-line. This is done via a so-called “Zig-Zag” pattern or string splitting on certain delimiters.

.... read more ....

See all Article posts

Latest Answerrit

Question: How can configure grub to use a specific kernel?

Published: March 18, 2026

Answer

You can configure grub via several ways to use a specific kernel or you can configure grub to use the latest one, or you can tell grub to pick one from a selection.

One specific kernel

If you inspect /etc/grub/grub.cfg you’ll see entries like this:

# the \ are mine, these are usually one big line but for blog purposes I
# multilined them
menuentry 'Debian GNU/Linux GNU/Linux, with Linux 6.12.8-amd64' --class debian \
    --class gnu-linux --class gnu --class os $menuentry_id_option \
    'gnulinux-6.12.8-amd64-advanced-5522bbcf-dc03-4d36-a3fe-2902be938ed4' {

You can use two identifiers to configure grub; you can use 'Debian GNU/Linux GNU/Linux, with Linux 6.12.8-amd64' or you can use the $menuentry_id_option with gnulinux-6.12.8-amd64-advanced-5522bbcf-dc03-4d36-a3fe-2902be938ed4.

.... read more ....

See all Answerrit posts

Latest Dev

git status can now compare branches

Published: March 14, 2026

For those running a development version of git from master or next, you probably have seen it already. Today I was inspecting the git logs of git and found this little gem. It supports my workflow to the max.

You can now configure git status to compare branches with your current branch in status. When you configure status.comparebranches you can use @{upstream} and @{push} and you see both how far you’ve diverged from your upstream and your push branch. For those, like me, who track an upstream branch which differs from their push branch this is a mighty fine feature!

.... read more ....

See all Dev posts