Home Explore Blog Models CI



nixpkgs

doc/packages/shell-helpers.section.md
a6fee325417f696dbef3767692c16ebb4acd76e305d7c5a50000000300000212
# Interactive shell helpers {#sec-shell-helpers}

Some packages provide shell integration to be more useful. But unlike other systems, nix doesn't have a standard `share` directory location. This is why a bunch of `PACKAGE-share` scripts are shipped that print the location of the corresponding shared folder. The current list of such packages is as follows:

- `fzf` : `fzf-share`

E.g. `fzf` can then be used in the `.bashrc` like this:

```bash
source "$(fzf-share)/completion.bash"
source "$(fzf-share)/key-bindings.bash"
```

Chunks
0e3a9f8c (1st chunk of `doc/packages/shell-helpers.section.md`)
Title: Nix Shell Helpers and Package Share Scripts
Summary
This section explains how Nix handles shell integration for packages that require shared directory locations, despite not having a standard `share` directory. It introduces `PACKAGE-share` scripts (e.g., `fzf-share`) which print the location of a package's shared folder. This allows users to source necessary completion or key-binding files in their shell configuration, as demonstrated with `fzf` integration in `.bashrc`.