mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 04:27:46 +08:00
feature flags: default stderr-nocaret to on
This commit is contained in:
parent
2e44076397
commit
a918cabf5e
|
@ -10,6 +10,7 @@ Syntax changes and new commands
|
|||
Deprecations and removed features
|
||||
---------------------------------
|
||||
- The ``fish_history`` value "default" is no longer an alias for "fish" (:issue:`7650`).
|
||||
- Redirection to standard error with the ``^`` character has been disabled by default. It can be turned back on using the ``stderr-nocaret`` feature flag, but will eventually be disabled completely (:issue:`7105`).
|
||||
|
||||
Scripting improvements
|
||||
----------------------
|
||||
|
|
|
@ -664,7 +664,7 @@ static void test_tokenizer() {
|
|||
using tt = token_type_t;
|
||||
const token_type_t types[] = {
|
||||
tt::string, tt::redirect, tt::string, tt::redirect, tt::string, tt::string,
|
||||
tt::string, tt::redirect, tt::redirect, tt::string, tt::pipe, tt::redirect,
|
||||
tt::string, tt::string, tt::string, tt::pipe, tt::redirect,
|
||||
tt::andand, tt::background, tt::oror, tt::pipe, tt::andand, tt::oror,
|
||||
tt::background, tt::pipe, tt::string, tt::end, tt::string};
|
||||
|
||||
|
@ -771,8 +771,6 @@ static void test_tokenizer() {
|
|||
|
||||
if (get_redir_mode(L"<") != redirection_mode_t::input)
|
||||
err(L"redirection_type_for_string failed on line %ld", (long)__LINE__);
|
||||
if (get_redir_mode(L"^") != redirection_mode_t::overwrite)
|
||||
err(L"redirection_type_for_string failed on line %ld", (long)__LINE__);
|
||||
if (get_redir_mode(L">") != redirection_mode_t::overwrite)
|
||||
err(L"redirection_type_for_string failed on line %ld", (long)__LINE__);
|
||||
if (get_redir_mode(L"2>") != redirection_mode_t::overwrite)
|
||||
|
@ -1885,7 +1883,7 @@ static void test_feature_flags() {
|
|||
say(L"Testing future feature flags");
|
||||
using ft = features_t;
|
||||
ft f;
|
||||
do_test(!f.test(ft::stderr_nocaret));
|
||||
do_test(f.test(ft::stderr_nocaret));
|
||||
f.set(ft::stderr_nocaret, true);
|
||||
do_test(f.test(ft::stderr_nocaret));
|
||||
f.set(ft::stderr_nocaret, false);
|
||||
|
|
|
@ -16,7 +16,7 @@ features_t::features_t() {
|
|||
features_t features_t::global_features;
|
||||
|
||||
const features_t::metadata_t features_t::metadata[features_t::flag_count] = {
|
||||
{stderr_nocaret, L"stderr-nocaret", L"3.0", L"^ no longer redirects stderr", false},
|
||||
{stderr_nocaret, L"stderr-nocaret", L"3.0", L"^ no longer redirects stderr", true},
|
||||
{qmark_noglob, L"qmark-noglob", L"3.0", L"? no longer globs", false},
|
||||
{string_replace_backslash, L"regex-easyesc", L"3.1", L"string replace -r needs fewer \\'s",
|
||||
false},
|
||||
|
|
|
@ -54,12 +54,12 @@ eval test_function
|
|||
|
||||
# Future Feature Flags
|
||||
status features
|
||||
#CHECK: stderr-nocaret off 3.0 ^ no longer redirects stderr
|
||||
#CHECK: stderr-nocaret on 3.0 ^ no longer redirects stderr
|
||||
#CHECK: qmark-noglob off 3.0 ? no longer globs
|
||||
#CHECK: regex-easyesc off 3.1 string replace -r needs fewer \'s
|
||||
status test-feature stderr-nocaret
|
||||
echo $status
|
||||
#CHECK: 1
|
||||
#CHECK: 0
|
||||
status test-feature not-a-feature
|
||||
echo $status
|
||||
#CHECK: 2
|
||||
|
|
Loading…
Reference in New Issue
Block a user