Files
dotfiles/.local/share/zsh/plugins/local/common/nx.zsh
2026-03-30 14:32:02 +03:00

15 lines
323 B
Bash
Executable File

#!/usr/bin/env zsh
# run nx commands from the project root
nx() {
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo "Usage: nx [args...]"
echo "Run nx commands from the project root"
return 0
fi
local d="$(dirname $(find-up package.json))"
pushd "$d" > /dev/null
"$d/nx" "$@"
popd > /dev/null
}