Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature flags #4940

Merged
merged 11 commits into from
May 6, 2018
Merged

Commits on May 6, 2018

  1. Add support for feature flags

    This introduces a new type features_t that exposes feature flags. The intent
    is to allow a deprecation/incremental adoption path. This is not a general
    purpose configuration mechanism, but instead allows for compatibility during
    the transition as features are added/removed.
    
    Each feature has a user-presentable short name and a short description. Their
    values are tracked in a struct features_t.
    
    We start with one feature stderr_nocaret, but it's not hooked up yet.
    ridiculousfish committed May 6, 2018
    Configuration menu
    Copy the full SHA
    14f766b View commit details
    Browse the repository at this point in the history
  2. Add status subcomannds: features and test-feature

    This teaches the status command to work with features.
    'status features' will show a table listing all known features and whether
    they are currently on or off.
    `status test-feature` will test an individual feature, setting the exit status to
    0 if the feature is on, 1 if off, 2 if unknown.
    ridiculousfish committed May 6, 2018
    Configuration menu
    Copy the full SHA
    782cae2 View commit details
    Browse the repository at this point in the history
  3. Allow setting feature flags on the command line

    This introduces a new command line option --features which can be used for
    enabling or disabling features for a particular fish session.
    
    Examples:
      fish --features stderr-nocaret
      fish --features 3.0,no-stderr-nocaret
      fish --features all
    
    Note that the feature set cannot be changed in an existing session.
    ridiculousfish committed May 6, 2018
    Configuration menu
    Copy the full SHA
    8a96f28 View commit details
    Browse the repository at this point in the history
  4. Bring back caret redirections under a feature flag

    This partially reverts 5b489ca, with
    carets acting as redirections unless the stderr-nocaret flag is set.
    This flag is off by default but may be enabled on the command line:
    
    fish --features stderr-nocaret
    ridiculousfish committed May 6, 2018
    Configuration menu
    Copy the full SHA
    902af26 View commit details
    Browse the repository at this point in the history
  5. Set features from the environment

    This enables users to opt in (or out) of specific features by setting
    the fish_features environment variable.
    
    For example `set -U fish_features stderr-nocaret` to opt into removing the
    caret redirection.
    ridiculousfish committed May 6, 2018
    Configuration menu
    Copy the full SHA
    d3201ad View commit details
    Browse the repository at this point in the history
  6. Add a qmark-noglob feature flag

    This adds a feature flag for controlling whether question marks are globs.
    It is not yet hooked up.
    ridiculousfish committed May 6, 2018
    Configuration menu
    Copy the full SHA
    dc8d603 View commit details
    Browse the repository at this point in the history
  7. Feature flag support for ? wildcard

    This partially reverts 6e56637 and fish-shell#4520
    by bringing back the ? wildcard, guarded by the qmark-noglob feature flag.
    ridiculousfish committed May 6, 2018
    Configuration menu
    Copy the full SHA
    762c31b View commit details
    Browse the repository at this point in the history
  8. Add a feature_test() function

    This is a convenience over fish_features().test()
    ridiculousfish committed May 6, 2018
    Configuration menu
    Copy the full SHA
    4194b4e View commit details
    Browse the repository at this point in the history
  9. Remove some references to ^ redirection from the docs

    Replace these with 2>
    ridiculousfish committed May 6, 2018
    Configuration menu
    Copy the full SHA
    87eb073 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d623ac5 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    060643a View commit details
    Browse the repository at this point in the history