~idmyn/dotfiles

ref: ef30c56e099365eeeacbed034ecbafeafee7defe dotfiles/shell/elvish/rc.elv -rw-r--r-- 951 bytes
ef30c56e — David Mynors Add nix to elvish path a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# inspo: https://github.com/muesli/dotfiles/blob/master/shell/rc.elv

use epm
epm:install &silent-if-installed=$true \
    github.com/zzamboni/elvish-modules

use github.com/zzamboni/elvish-modules/terminal-title

E:EDITOR="emacs -nw"

E:ANDROID_HOME=$E:HOME"/Library/Android/sdk"

paths = [
  $E:ANDROID_HOME/emulator
  $E:ANDROID_HOME/tools
  $E:ANDROID_HOME/tools/bin
  $E:ANDROID_HOME/platform-tools
  ~/.cargo/bin
  ~/.asdf/shims
  ~/.nix-profile/bin
  /usr/local/opt/asdf/bin
  /usr/local/bin
  $@paths
]

# prompt
edit:prompt = { put "\n"; tilde-abbr $pwd; put "> " }
edit:rprompt = { put "" }

# keybindings
edit:insert:binding[Alt+Backspace]=$edit:kill-small-word-left~

# aliases
fn q { exit }
fn e [@a]{ open -a Emacs $@a }
fn gs [@a]{ git status $@a }
fn ls [@a]{ e:ls -GF $@a }
fn la [@a]{ ls -GFa $@a }
fn ll [@a]{ ls -GFalh $@a }
fn otp [@a]{ pass otp -c $@a }

# run this once: direnv hook elvish > ~/.elvish/lib/direnv.elv
use direnv