A collection of useful bash functions and settings
#! /usr/bin/env bash

function repos() {
    local git_path=${GIT_ROOT-~/git}
    local pijul_path=${PIJUL_ROOT-~/pijul}
    local repo=$(\
      cat <(fd --hidden .git$ $git_path)     \
          <(fd --hidden .pijul$ $pijul_path) \
          | sed 's/\.git$//g;s/\.pijul$//g'  \
          | sk)
    if [ ! -z $repo ]; then
        cd $repo
    fi
}