1# mellon - Speak, friend, and enter
2
3Modules for [Elvish Shell](https://github.com/elves/elvish)
4
5# Install
6
7```elvish
8use epm
9epm:install &silent-if-installed=$true github.com/ejrichards/mellon
10
11```
12
13## NixOS
14
15`flake.nix` supplies a NixOS module that lets you import in the same manner as `epm`
16
17```nix
18{
19 ...
20 nixosConfigurations = {
21 modules = [
22 mellon.nixosModules.default
23 ];
24 };
25}
26```
27
28# Usage
29
30```elvish
31use github.com/ejrichards/mellon/<module>
32```
33
34## `atuin.elv`
35
36Add bindings for `Ctrl-r` and `Up` to use atuin for searching history.
37```elvish
38if (has-external atuin) {
39 use github.com/ejrichards/mellon/atuin
40 set edit:insert:binding[Ctrl-r] = { atuin:search }
41 set edit:insert:binding[Up] = { atuin:search-up }
42}
43```
44
45## `fzf.elv`
46
47Add bindings for `Ctrl-r` and `Up` to use fzf for searching history.
48```elvish
49if (has-external fzf) {
50 use github.com/ejrichards/mellon/fzf
51 set edit:insert:binding[Ctrl-r] = { fzf:history }
52 set edit:insert:binding[Up] = { fzf:history }
53}
54```
55
56## `yazi.elv`
57
58Add an alias `y` that will `cd` on quit.
59```elvish
60if (has-external yazi) {
61 use github.com/ejrichards/mellon/yazi
62 edit:add-var y~ $yazi:y~
63}
64```