Last active
April 29, 2023 19:30
-
-
Save darkwater4213/7226144a139b5022d9eb5af32fd9125d to your computer and use it in GitHub Desktop.
Nushell fancy df
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env nu | |
| # aliases df to a hacky way of turning it into a somewhat nice table | |
| # because df | detect columns actually doesn't work all that well. | |
| alias df = nu -c ( nu -c 'df | rg -e " +" -r " " | rg -Ue "\n" -r "] [" | rg -e "Mounted on\\]" -r "Mountpoint];" | rg -e "Filesystem" -r "[[Filesystem" | rg -e "\\] \\[$" -r "]]"' ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment