Skip to content

Nushell aliases aren't exported, so the file can only be sourced rather than imported #1160

@sockeye-d

Description

@sockeye-d

Currently, the init script generates these two lines:

alias {{cmd}} = __zoxide_z
alias {{cmd}}i = __zoxide_zi

Since these aren't exported, the file can only be sourced rather than used. This limits its usefulness as I can't import it in a different module, export that use, and then transitively import zoxide in my config file, as I am trying to do right now. If those two lines were changed to be

export alias z = __zoxide_z
export alias zi = __zoxide_zi

users could use

# if they want to import everything
use ~/.zoxide *
# or, if they want to explicitly import both
use ~/.zoxide [z zi]
# or, if they only want the keyword mode
use ~/.zoxide z
# or, if they only want the interactive mode
use ~/.zoxide zi

instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions