Skip to content

Warn on use of deprecated features (qmark-noglob, & in tokens) #8131

Open

Description

@krobelus

Some ideas in #7991 (comment)

Activity

  1. added this to the fish 3.4.0 milestone on Jul 10, 2021
  2. changed the title [-]Warn about deprecated features (qmark-noglob, & in tokens)[/-] [+]Warn on use of deprecated features (qmark-noglob, & in tokens)[/+] on Jul 11, 2021
  3. uberjay commented on Aug 20, 2024

    @uberjay

    This is almost certainly not the right place to leave this comment, but I'm not sure where is:

    Somehow I just encountered the qmark-noglob "feature", after upgrading fish. I spent longer than I'd care to admit getting confused trying to move a set of files from one directory to another. After seeing that ~/Downloads/20*-*.pdf matched too many files, I tried to use ~/Downloads/20??-??.pdf. Eventually I executed the mv command using bash and it worked... leading me to eventually run across the desire to completely remove the questionmark glob character in fish.

    I guess other people have different workflows! I use ? as a glob character quite frequently and it's kind of blowing my mind that it's slated to complete removal. (I also don't recall running into a single instance of it getting in the way of something) Is there a replacement planned? (Other than old version of fish or different shell entirely?)

  4. hholst80 commented on Dec 14, 2024

    @hholst80

    ? and & are very often used as part of URL requests.

    If you wish to disable the glob for these you can use this command:

    # set -U fish_features qmark-noglob
    
    # status features
    stderr-nocaret          on  3.0 ^ no longer redirects stderr (historical, can no longer be changed)
    qmark-noglob            on  3.0 ? no longer globs
    regex-easyesc           on  3.1 string replace -r needs fewer \'s
    ampersand-nobg-in-token on  3.4 & only backgrounds if followed by a separator
    
  5. norbertkeri commented on Dec 18, 2024

    @norbertkeri

    I just saw in the release notes of 4.0b1 that this (qmark-noglob) will become a read only flag, and it will be "impossible" to turn off

    The flag will eventually be made read-only, making it impossible to turn off.

    Could someone explain the reason for making this "impossible" to turn off? And maybe not do that?

  6. faho commented on Dec 18, 2024

    @faho
    Member

    Could someone explain the reason for making this "impossible" to turn off? And maybe not do that?

    It'll be impossible to turn off because we don't want to have multiple dialects of the language. We'll do that for a transitional phase, but we don't want to have the same effect as bash with "nullglob" and "errexit" and "extglob" and so on, where what a line means depends on global state.

    It's turned off because it makes ? a special character that needs to be quoted and escaped and in particular makes URLs annoying to use. It also doesn't pull its weight because it is often not actually necessary and can be misused and lead to undermatching - I saw archlinux match python3.? in a script once, which broke once python3.10 came out.

    Fish's globs are very simple, and if you need something more specific you can always use find.

  7. septatrix commented on Dec 19, 2024

    @septatrix
  8. faho commented on Dec 19, 2024

    @faho
    Member

    removing the alternative altogether seems like a poor decision. By its very nature a shell is something that should be extensively configurable

    Fish, by its design philosophy, is not. We try to avoid configuration options, and especially global state options like this.

    Anyway, I do believe this discussion has now run its course and trust you'll leave it at that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions