nushell / nushell/nu_scripts

direnv hook "cannot find column 'PWD'"

Open
#1,026 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nushell
Stars
1.3k
Forks
323
Avg merge
3h 34m
Merged PRs (30d)
4

Description

I am nu to nushell, and am trying to integrate direnv in the config.

I have copied the hooks to the correct config path, however when I launch my terminal and nushell I get the following error:

 22 │ $env.config.hooks.env_change.PWD = (
 23 │     $env.config.hooks.env_change.PWD | append (source nu-hooks/nu-hooks/direnv/config.nu)
    ·                                  ─┬─
    ·                                   ╰── cannot find column 'PWD'
 24 │ )

I thought that PWD was supposed to automatically be set, and manually trying to set is in config throws and error that it can't be set manually.

How am I supposed to add this hook to my config so that PWD column is available?

Thanks for the help.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Nushell hook setup described in the issue and read nu-hooks/nu-hooks/direnv/config.nu alongside the referenced $env.config.hooks.env_change.PWD configuration. Reproduce the launch error in Nushell, then verify the documented hook configuration works without the missing-column error.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.