You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rc.elv 797B

123456789101112131415161718192021222324252627282930313233343536373839
  1. use epm
  2. use util
  3. use config
  4. use module
  5. fn alias [cmd @a]{ put [@b]{ (external $cmd) (explode $a) $@b } }
  6. fn xqt [a]{ e $E:XBPS_DISTDIR/srcpkgs/$a/template }
  7. fn r [@a]{
  8. f = (mktemp)
  9. if ?(ranger --choosedir=$f $@a) { cd (e:cat $f) }
  10. rm -f $f
  11. }
  12. ls~ = (alias exa --group-directories-first -s Name)
  13. cat~ = (alias bat)
  14. xr~ = (alias sudo xbps-remove -R)
  15. -exports- = [&]
  16. {
  17. use theme
  18. use completers
  19. use github.com/xiaq/edit.elv/smart-matcher
  20. use stack
  21. -exports- = (module:exported $stack:)
  22. smart-matcher:apply
  23. util:add-before-readline {
  24. util:set-title (tilde-abbr $pwd) >/dev/tty
  25. }
  26. util:add-after-readline [a]{
  27. if (eq $a '') { print "\r" >/dev/tty; ls >/dev/tty }
  28. util:set-title (splits ' ' $a | take 1)' '(tilde-abbr $pwd) >/dev/tty
  29. }
  30. }
  31. set-env GPG_TTY (tty)