Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.37k stars 226 forks source link

Add support for Elvish #281

Open alexherbo2 opened 3 years ago

alexherbo2 commented 3 years ago
Homepage | GitHub

Module

~/.elvish/lib/broot.elv

# Broot
# https://dystroy.org/broot/

fn br [@arguments]{
  path = (mktemp)
  broot --out $path $@arguments
  cd (cat $path)
  rm -f $path
}

Configuration

~/.elvish/rc.elv

# Modules
use broot

# Functions
fn br [@arguments]{
  broot:br $@arguments
}
Canop commented 3 years ago

Can you come to my chat and discuss this ?

https://miaou.dystroy.org/3490

haxscramper commented 1 year ago

Updated version for the latest elvish and broot versions

fn br {|@arguments|
  var path = (mktemp)
  broot --outcmd $path $@arguments
  if ?(test -s $path) {
    eval (cat $path)
  }
  e:rm -f $path
}