irongit

feat: store rust debug paths for user in cache so that target/debug binaries can be used more easily

huncholanehuncholaneauthored
parent 31a6e47commit d79acefb3887babc3ebc69d05c52cbc200b4d461Browse files

1 file changed, +7 -0

+7-0before_plugins.sh
@@ -4,6 +4,13 @@ export PATH="$PATH:$HOME/.local/share/solana/install/active_release/bin"
44 export PATH="$HOME/.local/share/fnm:$PATH"
55 export PATH="$PATH:/usr/local/flutter/bin"
66
7+# Set up a cached file as a subprocess with all the home rust debug paths in it
8+(
9+ mkdir -p ~/.cache
10+ fd -I -c never -E 'doc' -E 'package' --full-path 'target/debug$' ~ | tr '\n' ':' >~/.cache/RUST_DEBUG_PATHS
11+)
12+[ -f ~/.cache/RUST_DEBUG_PATHS ] && RUST_DEBUG_PATHS="$(cat ~/.cache/RUST_DEBUG_PATHS)" && export PATH="$PATH:$RUST_DEBUG_PATHS"
13+
714 # Add environments
815 [ -f ~/.fzf.zsh ] && . ~/.fzf.zsh
916 [ -f ~/.cargo/env ] && . "$HOME/.cargo/env"