Skip to content

Commit ef12fdb

Browse files
committed
Various updates
1 parent ed657db commit ef12fdb

File tree

11 files changed

+64
-17
lines changed

11 files changed

+64
-17
lines changed

abbreviations

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,12 @@ i install
3030
u uninstall
3131
r run
3232
rd run dev
33+
34+
# Shorten atuin command given I can never remember how to spell it
35+
h atuin
36+
37+
# Use zoxide over cd
38+
cd z
39+
40+
# Rust
41+
cb cargo build

bundle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ package bang-bang
33
package foreign-env
44
package https://github.com/jhillyerd/plugin-git
55
package https://github.com/lilyball/nix-env.fish
6-
package https://github.com/zephraph/yarn
76
package technicolor
8-
package z
7+
package zoxide

functions/ai.fish

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function ai --description "Run a chatgpt query"
2+
echo "$argv" | chat-gpt | glow
3+
end

functions/build-dpd.fish

Lines changed: 0 additions & 13 deletions
This file was deleted.

functions/fix-nexus.fish

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
function fix-nexus --description "Update Nexus's dependencies when a compile fails"
2+
OSTYPE=linux-gnu tools/ci_download_dendrite_stub
3+
OSTYPE=linux-gnu tools/ci_download_maghemite_mgd
4+
5+
# Add these to the path
6+
set -gx DENDRITE_BIN_DIR /Users/just-be/Oxide/omicron/out/dendrite-stub/bin
7+
set -gx MGD_BIN_DIR /Users/just-be/Oxide/omicron/out/mgd/root/opt/oxide/mgd/bin
8+
9+
readenv tools/dendrite_openapi_version
10+
set -l DENDRITE_COMMIT "$COMMIT"
11+
12+
readenv tools/maghemite_mg_openapi_version
13+
set -l MGD_COMMIT "$COMMIT"
14+
15+
cd ../dendrite
16+
git fetch && git checkout $DENDRITE_COMMIT
17+
cargo build -p dpd --release --features=tofino_stub
18+
cargo build -p swadm --release
19+
cp target/release/dpd "$DENDRITE_BIN_DIR/dpd"
20+
cp target/release/swadm "$DENDRITE_BIN_DIR/swadm"
21+
cd -
22+
23+
cd ../maghemite
24+
git fetch && git checkout $MGD_COMMIT
25+
cargo build -p mgd --release --no-default-features
26+
cp target/release/mgd "$MGD_BIN_DIR/mgd"
27+
cd -
28+
end

functions/gmv.fish

Lines changed: 0 additions & 1 deletion
This file was deleted.

functions/ntp.fish

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
function ntp
2+
set -l test (rg -A1 "\#\[(nexus_test|tokio::test)\]" --no-heading -IN | rg 'async fn (\w+)' -o --no-heading --color never | awk '{print $3}' | fzf)
3+
run_with_history nt $test
4+
end

functions/readenv.fish

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# source: https://github.com/kowalski7cc/fish-readenv
2+
function readenv --description "Reads the environment variables from a file"
3+
for file in $argv
4+
if test -r $file
5+
for row in (read -z < $file)
6+
set -l kv (string split -m 1 \= $row)
7+
set -gx (string trim $kv[1]) (string trim -c " \"" $kv[2])
8+
end
9+
end
10+
end
11+
end

functions/run_with_history.fish

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
function run_with_history
2+
add_history_entry $argv
3+
eval $argv
4+
end

helpers/setup.fish

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ switch (uname)
7878
git config --global core.pager delta
7979
git config --global delta.syntax-theme Nord
8080
end
81+
if not type -q zoxide
82+
cargo install zoxide --locked
83+
end
8184
case "*"
8285
echo "This platform won't have everything. PRs welcome."
8386
end

init.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ switch (uname)
1818
set CFLAGS "-I(brew --prefix zlib)/include -I(brew --prefix sqlite)/include -I(brew --prefix bzip2)/include"
1919
set LDFLAGS "-L(brew --prefix zlib)/lib -L(brew --prefix sqlite)/lib -L(brew --prefix bzip2)/lib"
2020
source ~/.asdf/asdf.fish
21-
fish_add_path ~/Code/deno.run/.run ~/Oxide/omicron/out/dendrite-stub/root/opt/oxide/dendrite/bin ~/Scripts
21+
fish_add_path ~/Code/deno.run/.run ~/Oxide/omicron/out/dendrite-stub/bin ~/Oxide/omicron/out/mgd/root/opt/oxide/mgd/bin ~/Scripts
2222
case Linux
2323
set PKG_CONFIG_PATH "/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/home/linuxbrew/.linuxbrew/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig"
2424
if test -d ~/usr/local/Applications/android-studio/bin

0 commit comments

Comments
 (0)