Modules for Elvish Shell
1# mellon - Speak, friend, and enter 2 3Modules for [Elvish Shell](https://github.com/elves/elvish) 4 5# Install 6## epm 7Required until git.sr.ht is added upstream: 8```elvish 9use epm 10mkdir -p $epm:managed-dir/git.sr.ht/ 11echo "{ 12 \"method\": \"git\", 13 \"protocol\": \"https\", 14 \"levels\": \"2\" 15}" > $epm:managed-dir/git.sr.ht/epm-domain.cfg 16``` 17 18Install module 19```elvish 20use epm 21epm:install &silent-if-installed=$true git.sr.ht/~ejri/mellon 22 23``` 24 25## NixOS 26 27`flake.nix` supplies a NixOS module that lets you import in the same manner as `epm` 28 29Input 30```nix 31mellon.url = "git+https://git.sr.ht/~ejri/mellon"; 32``` 33Use module 34```nix 35{ 36 ... 37 nixosConfigurations = { 38 modules = [ 39 mellon.nixosModules.default 40 ]; 41 }; 42} 43``` 44 45# Usage 46 47```elvish 48use git.sr.ht/~ejri/mellon/<module> 49``` 50 51## `atuin.elv` 52 53Add bindings for `Ctrl-r` and `Up` to use atuin for searching history. 54```elvish 55if (has-external atuin) { 56 use git.sr.ht/~ejri/mellon/atuin 57 set edit:insert:binding[Ctrl-r] = { atuin:search } 58 set edit:insert:binding[Up] = { atuin:search-up } 59} 60``` 61 62## `fzf.elv` 63 64Add bindings for `Ctrl-r` and `Up` to use fzf for searching history. 65```elvish 66if (has-external fzf) { 67 use git.sr.ht/~ejri/mellon/fzf 68 set edit:insert:binding[Ctrl-r] = { fzf:history } 69 set edit:insert:binding[Up] = { fzf:history } 70} 71``` 72 73## `yazi.elv` 74 75Add an alias `y` that will `cd` on quit. 76```elvish 77if (has-external yazi) { 78 use git.sr.ht/~ejri/mellon/yazi 79 edit:add-var y~ $yazi:y~ 80} 81```