Home Explore Blog Models CI



nixpkgs

1st chunk of `doc/packages/shell-helpers.section.md`
0e3a9f8c5004d8a2aa7d27fed00a3dfc6d69be2403dedbf40000000100000212
# 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"
```

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`.