feat: store rust debug paths for user in cache so that target/debug binaries can be used more easily
1 file changed, +7 -0
+7-0before_plugins.sh
| @@ -4,6 +4,13 @@ export PATH="$PATH:$HOME/.local/share/solana/install/active_release/bin" | ||
| 4 | 4 | export PATH="$HOME/.local/share/fnm:$PATH" |
| 5 | 5 | export PATH="$PATH:/usr/local/flutter/bin" |
| 6 | 6 | |
| 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 | + | |
| 7 | 14 | # Add environments |
| 8 | 15 | [ -f ~/.fzf.zsh ] && . ~/.fzf.zsh |
| 9 | 16 | [ -f ~/.cargo/env ] && . "$HOME/.cargo/env" |