Modules for Elvish Shell

fix: Move from github to sourcehut urls

Changed files
+20 -8
+17 -5
README.md
··· 3 Modules for [Elvish Shell](https://github.com/elves/elvish) 4 5 # Install 6 7 ```elvish 8 use epm 9 - epm:install &silent-if-installed=$true github.com/ejrichards/mellon 10 11 ``` 12 ··· 28 # Usage 29 30 ```elvish 31 - use github.com/ejrichards/mellon/<module> 32 ``` 33 34 ## `atuin.elv` ··· 36 Add bindings for `Ctrl-r` and `Up` to use atuin for searching history. 37 ```elvish 38 if (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 } ··· 47 Add bindings for `Ctrl-r` and `Up` to use fzf for searching history. 48 ```elvish 49 if (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 } ··· 58 Add an alias `y` that will `cd` on quit. 59 ```elvish 60 if (has-external yazi) { 61 - use github.com/ejrichards/mellon/yazi 62 edit:add-var y~ $yazi:y~ 63 } 64 ```
··· 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 ··· 40 # Usage 41 42 ```elvish 43 + use git.sr.ht/~ejri/mellon/<module> 44 ``` 45 46 ## `atuin.elv` ··· 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 } ··· 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 } ··· 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 ```
+3 -3
flake.nix
··· 23 name = "mellon"; 24 src = ./.; 25 installPhase = '' 26 - mkdir -p $out/share/elvish/lib/github.com/ejrichards/mellon 27 - cp *.elv $out/share/elvish/lib/github.com/ejrichards/mellon 28 ''; 29 }; 30 } ··· 34 { pkgs, ... }: 35 { 36 environment.systemPackages = [ self.packages.${pkgs.system}.default ]; 37 - environment.pathsToLink = [ "/share/elvish/lib/github.com/ejrichards" ]; 38 }; 39 }; 40 }
··· 23 name = "mellon"; 24 src = ./.; 25 installPhase = '' 26 + mkdir -p $out/share/elvish/lib/git.sr.ht/~ejri/mellon 27 + cp *.elv $out/share/elvish/lib/git.sr.ht/~ejri/mellon 28 ''; 29 }; 30 } ··· 34 { pkgs, ... }: 35 { 36 environment.systemPackages = [ self.packages.${pkgs.system}.default ]; 37 + environment.pathsToLink = [ "/share/elvish/lib/git.sr.ht/~ejri" ]; 38 }; 39 }; 40 }