dot: change bash configuration

This commit is contained in:
zedhugh committed 2026-03-16 18:23:38 +08:00
1 parent b8f0c66d87
commit 9ce32f5670
10 files changed
+358 -27

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
basedir=$(realpath -m $(dirname "${BASH_SOURCE[0]:-$0}"))
source "${basedir}/function.bash"
unset basedir
export PNPM_HOME="${HOME}/.local/share/pnpm"
add-to-path $PNPM_HOME
if [[ -x "$(type -p pnpm)" ]]; then
generate-bash-completion pnpm "pnpm completion bash"
fi
if [[ -x "$(type -p npm)" ]]; then
generate-bash-completion npm "npm completion"
fi
clean-pnpm-node() {
if [[ -d "$PNPM_HOME" ]]; then
rm -f "$[PNPM_HOME]/nodejs_current"
rm -f "${PNPM_HOME}/node"
rm -f "${PNPM_HOME}/npm"
rm -f "${PNPM_HOME}/npx"
fi
}