81 lines
1.5 kB
1
# mellon - Speak, friend, and enter
2
3
Modules for [Elvish Shell](https://github.com/elves/elvish)
4
5
# Install
6
## epm
7
Required until git.sr.ht is added upstream:
8
```elvish
9
use epm
10
mkdir -p $epm:managed-dir/git.sr.ht/
11
echo "{
12
\"method\": \"git\",
13
\"protocol\": \"https\",
14
\"levels\": \"2\"
15
}" > $epm:managed-dir/git.sr.ht/epm-domain.cfg
16
```
17
18
Install module
19
```elvish
20
use epm
21
epm: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
29
Input
30
```nix
31
mellon.url = "git+https://git.sr.ht/~ejri/mellon";
32
```
33
Use module
34
```nix
35
{
36
...
37
nixosConfigurations = {
38
modules = [
39
mellon.nixosModules.default
40
];
41
};
42
}
43
```
44
45
# Usage
46
47
```elvish
48
use git.sr.ht/~ejri/mellon/<module>
49
```
50
51
## `atuin.elv`
52
53
Add bindings for `Ctrl-r` and `Up` to use atuin for searching history.
54
```elvish
55
if (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
64
Add bindings for `Ctrl-r` and `Up` to use fzf for searching history.
65
```elvish
66
if (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
75
Add an alias `y` that will `cd` on quit.
76
```elvish
77
if (has-external yazi) {
78
use git.sr.ht/~ejri/mellon/yazi
79
edit:add-var y~ $yazi:y~
80
}
81
```
82