Skip to content

flakes problems related to # and zsh #4686

@timsears

Description

@timsears

nix flakes' # does not play nice with zsh when extendedGlob is enabled.

Here's a simple example...

> setopt extendedGlob                                                         
> nix profile install nixpkgs#hello            
Found existing alias for "nix". You should use: "n"
zsh: no matches found: nixpkgs#hello

Here's a workaround.

> unsetopt extendedGlob    
> nix profile install nixpkgs#hello  

...works

Any command that uses the # in the command is likely affected.

Many people will have extended glob enable automatically if they use zsh configuration frameworks such as oh-my-zsh.

Took a long time for me to realize this was a zsh issue more than a nix flakes issue. Might suggest that the resource path not include a # going forward.

This issue can be closed, but parking it here so people can find it when they search.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions