76 lines
1.4 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
```nix
30
{
31
...
32
nixosConfigurations = {
33
modules = [
34
mellon.nixosModules.default
35
];
36
};
37
}
38
```
39
40
# Usage
41
42
```elvish
43
use git.sr.ht/~ejri/mellon/<module>
44
```
45
46
## `atuin.elv`
47
48
Add bindings for `Ctrl-r` and `Up` to use atuin for searching history.
49
```elvish
50
if (has-external atuin) {
51
use git.sr.ht/~ejri/mellon/atuin
52
set edit:insert:binding[Ctrl-r] = { atuin:search }
53
set edit:insert:binding[Up] = { atuin:search-up }
54
}
55
```
56
57
## `fzf.elv`
58
59
Add bindings for `Ctrl-r` and `Up` to use fzf for searching history.
60
```elvish
61
if (has-external fzf) {
62
use git.sr.ht/~ejri/mellon/fzf
63
set edit:insert:binding[Ctrl-r] = { fzf:history }
64
set edit:insert:binding[Up] = { fzf:history }
65
}
66
```
67
68
## `yazi.elv`
69
70
Add an alias `y` that will `cd` on quit.
71
```elvish
72
if (has-external yazi) {
73
use git.sr.ht/~ejri/mellon/yazi
74
edit:add-var y~ $yazi:y~
75
}
76
```
77