dotfiles/nushell/config/gclone.nu

14 lines
391 B
Plaintext
Raw Normal View History

2023-11-13 10:59:32 +01:00
# gclone aliases
def _gclone_dirs [] {
let slashes = ($env.GCLONE_PATH | split row "/" | length) + 2
open ([$env.GCLONE_PATH, .cdgcache] | path join)
| lines
| where { ($in | split row "/" | length) >= $slashes }
| each { $in | split row "/" | last }
| sort
| uniq
}
def-env cdg [key: string@_gclone_dirs] { cd (CLICOLOR_FORCE=1 pgd $key) }