Modules for Elvish Shell

fix: Move from github to sourcehut urls

Changed files
+20 -8
+17 -5
README.md
···
Modules for [Elvish Shell](https://github.com/elves/elvish)
# Install
```elvish
use epm
-
epm:install &silent-if-installed=$true github.com/ejrichards/mellon
```
···
# Usage
```elvish
-
use github.com/ejrichards/mellon/<module>
```
## `atuin.elv`
···
Add bindings for `Ctrl-r` and `Up` to use atuin for searching history.
```elvish
if (has-external atuin) {
-
use github.com/ejrichards/mellon/atuin
set edit:insert:binding[Ctrl-r] = { atuin:search }
set edit:insert:binding[Up] = { atuin:search-up }
}
···
Add bindings for `Ctrl-r` and `Up` to use fzf for searching history.
```elvish
if (has-external fzf) {
-
use github.com/ejrichards/mellon/fzf
set edit:insert:binding[Ctrl-r] = { fzf:history }
set edit:insert:binding[Up] = { fzf:history }
}
···
Add an alias `y` that will `cd` on quit.
```elvish
if (has-external yazi) {
-
use github.com/ejrichards/mellon/yazi
edit:add-var y~ $yazi:y~
}
```
···
Modules for [Elvish Shell](https://github.com/elves/elvish)
# Install
+
## epm
+
Required until git.sr.ht is added upstream:
+
```elvish
+
use epm
+
mkdir -p $epm:managed-dir/git.sr.ht/
+
echo "{
+
\"method\": \"git\",
+
\"protocol\": \"https\",
+
\"levels\": \"2\"
+
}" > $epm:managed-dir/git.sr.ht/epm-domain.cfg
+
```
+
Install module
```elvish
use epm
+
epm:install &silent-if-installed=$true git.sr.ht/~ejri/mellon
```
···
# Usage
```elvish
+
use git.sr.ht/~ejri/mellon/<module>
```
## `atuin.elv`
···
Add bindings for `Ctrl-r` and `Up` to use atuin for searching history.
```elvish
if (has-external atuin) {
+
use git.sr.ht/~ejri/mellon/atuin
set edit:insert:binding[Ctrl-r] = { atuin:search }
set edit:insert:binding[Up] = { atuin:search-up }
}
···
Add bindings for `Ctrl-r` and `Up` to use fzf for searching history.
```elvish
if (has-external fzf) {
+
use git.sr.ht/~ejri/mellon/fzf
set edit:insert:binding[Ctrl-r] = { fzf:history }
set edit:insert:binding[Up] = { fzf:history }
}
···
Add an alias `y` that will `cd` on quit.
```elvish
if (has-external yazi) {
+
use git.sr.ht/~ejri/mellon/yazi
edit:add-var y~ $yazi:y~
}
```
+3 -3
flake.nix
···
name = "mellon";
src = ./.;
installPhase = ''
-
mkdir -p $out/share/elvish/lib/github.com/ejrichards/mellon
-
cp *.elv $out/share/elvish/lib/github.com/ejrichards/mellon
'';
};
}
···
{ pkgs, ... }:
{
environment.systemPackages = [ self.packages.${pkgs.system}.default ];
-
environment.pathsToLink = [ "/share/elvish/lib/github.com/ejrichards" ];
};
};
}
···
name = "mellon";
src = ./.;
installPhase = ''
+
mkdir -p $out/share/elvish/lib/git.sr.ht/~ejri/mellon
+
cp *.elv $out/share/elvish/lib/git.sr.ht/~ejri/mellon
'';
};
}
···
{ pkgs, ... }:
{
environment.systemPackages = [ self.packages.${pkgs.system}.default ];
+
environment.pathsToLink = [ "/share/elvish/lib/git.sr.ht/~ejri" ];
};
};
}