3 ms·
Here's one that doesn't hide the snaps but but still keeps it not cluttered (relies on ripgrep) : function df { OUTPUT=$(/usr/bin/df $@) snaps=$(echo $
by omertuchfeld 6y ago
Here's one that doesn't hide the snaps but but still keeps it not cluttered (relies on ripgrep) :
function df {
OUTPUT=$(/usr/bin/df $@)
snaps=$(echo ${OUTPUT} | rg "^.+/snap/(.+)/.+$" -r '$1' | tr '\n' ' ')
printf "\x1b[33m\x1b[1mFILTERING SNAP MOUNTPOINTS:\x1b[0m\x1b[33m\n$snaps\x1b[0m\n\n" >&2
echo $OUTPUT | grep -v "/snap/"
}