8000 Make # path component char · Issue #10271 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

Make # path component char #10271

@quantenzitrone

Description

@quantenzitrone

Currently, the characters that separate path components as used by backward-path-component are hard-coded:

fish-shell/src/tokenizer.rs

Lines 1264 to 1266 in 05ac1b7

fn is_path_component_character(c: char) -> bool {
tok_is_string_character(c, None) && !L!("/={,}'\":@").as_char_slice().contains(&c)
}

It'd be nice if that could be customized.
Specifically, I would like to add # as a path component separator, because on NixOS with flakes # is used as a separator between the flake and the selected package from the flake. e.g. nix profile install nixpkgs#fish

$ fish --version
fish, version 3.7.0
$ echo $version
3.7.0
$ echo $TERM
alacritty
$ uname -a
Linux laptop 6.1.70-xanmod1 #1-NixOS SMP PREEMPT_DYNAMIC Tue Jan  1 00:00:00 UTC 1980 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0