Modern CLI tools

- linux bsd cli

The CLI tools ecosystem is very alive, I feel this trend restarted with the Go and Rust languages, for the best.
I’ve used some CLI commands for multiple decades, it’s hard to force new habits, but some of those new tools really justify some efforts.

This is a list of some I’ve adopted already or trying to adopt, obviously opiniated choices:

function y() {
    tmp="$(mktemp -t "yazi-cwd.XXXXX")"
    yazi "$@" --cwd-file="$tmp"
    if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
        cd -- "$cwd"
    fi
    rm -f -- "$tmp"
}

Example .config/yazi/yazi.toml to open your editor:

[opener]
text = [
	{ run = 'helix "$@"', block = true },
]
[open]
rules = [
	{ mime = "text/*", use = "text" },
	{ name = "*.go", use = "text" },
]
alias http="curlie"
http -v -k POST https://localhost:8443 user=xx