Skip to content

nu -i -c does not source config.nu #7442

@justinlovinger

Description

@justinlovinger

Describe the bug

nu -i -c does not source config.nu.

How to reproduce

  1. Add alias test = echo "test" to config.nu.
  2. Run nu -i -c test.

Expected behavior

I expected nu to start an interactive shell with configuration from config.nu, run commands from -c, and exit after those commands finished.

Screenshots

No response

Configuration

key value
version 0.72.0
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.64.0
cargo_version cargo 1.64.0
pkg_version 0.72.0
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
features database, default, trash, which, zip
installed_plugins

P.S. ignore build_time. This is NixOS.

Additional context

You can work around the bug by adding --config.

I believe env.nu is not sourced either, but I did not test this as thoroughly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:configurationIssue related to nu's configuration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions