Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/reference/cli/pixi/shell-hook_extender
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ pixi shell-hook --environment cuda
pixi shell-hook --json
```

Sourcing the script in bash and similar shells:

```shell
eval "$(pixi shell-hook)"
```

or in fish shell:

```shell
pixi shell-hook | source
```

or in powershell:

```shell
(pixi shell-hook) | Out-String | Invoke-Expression
```

Example use-case, when you want to get rid of the `pixi` executable in a Docker container.

```shell
Expand Down
11 changes: 11 additions & 0 deletions docs/reference/cli/pixi/shell_extender
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
--8<-- [start:description]

!!! note
Never put the `pixi shell` command inside one of your shell's startup files (.profile, .bashrc and the likes):
the command starts a new shell without special arguments so the new shell will again execute your startup files,
which in turn will again run `pixi shell` and so on, recursively until failure.

Use [shell-hook](./shell-hook.md) instead if you want to activate a pixi environment when your shell starts.

--8<-- [end:description]

--8<-- [start:example]

## Examples
Expand Down