#!/usr/bin/env zsh
# My custom zsh functions

fzf-z() {
    dir=$(z | fzf --tiebreak=index --tac | sed -E 's/^[0-9]+[[:space:]]+//')
    cd $dir
}

mkcd ()
{
    mkdir -p -- "$1" && cd -P -- "$1"
}

run() {
    nix run nixpkgs#"$1" -- ${@:2}
}
