-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy path.nvfuser-shell
More file actions
32 lines (27 loc) · 1023 Bytes
/
.nvfuser-shell
File metadata and controls
32 lines (27 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# SPDX-FileCopyrightText: Copyright (c) 2025-present NVIDIA CORPORATION & AFFILIATES.
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
# nvFuser shell function loader
#
# This file should be sourced when you're in an nvFuser directory.
#
# Add to ~/.zshrc:
# chpwd() { [[ -f .nvfuser-shell ]] && source .nvfuser-shell; }
# [[ -f .nvfuser-shell ]] && source .nvfuser-shell
#
# Or for bash, add to ~/.bashrc:
# _load_nvfuser_shell() { [[ -f .nvfuser-shell ]] && source .nvfuser-shell; }
# PROMPT_COMMAND="_load_nvfuser_shell${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
# _load_nvfuser_shell
# Only load once per shell session
if [ -z "$_NVFUSER_SHELL_LOADED" ]; then
# Since .nvfuser-shell is in the repo root, use the directory we're in
_NVFUSER_ROOT="$PWD"
# Source the shell integration script
. "$_NVFUSER_ROOT/tools/env-config/nvfuser-config-shell.sh"
# Clean up
unset _NVFUSER_ROOT
# Mark as loaded so we don't load again
export _NVFUSER_SHELL_LOADED=1
fi