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