mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-04 07:21:14 -03:00
refactor: move const to fish_widestring
Another step to eliminate dependency cycles between `src/expand.rs` and `src/common.rs`. Part of #12625
This commit is contained in:
committed by
Johannes Altmanninger
parent
c13038b968
commit
cf6170200c
@@ -1,7 +1,6 @@
|
||||
//! Prototypes for various functions, mostly string utilities, that are used by most parts of fish.
|
||||
|
||||
use crate::{
|
||||
expand::PROCESS_EXPAND_SELF_STR,
|
||||
global_safety::{AtomicRef, RelaxedAtomicBool},
|
||||
prelude::*,
|
||||
terminal::Outputter,
|
||||
@@ -12,9 +11,9 @@
|
||||
use fish_feature_flags::{FeatureFlag, feature_test};
|
||||
use fish_widestring::{
|
||||
ANY_CHAR, ANY_STRING, ANY_STRING_RECURSIVE, ASCII_MAX, BRACE_BEGIN, BRACE_END, BRACE_SEP,
|
||||
BRACE_SPACE, BYTE_MAX, HOME_DIRECTORY, INTERNAL_SEPARATOR, PROCESS_EXPAND_SELF, UCS2_MAX,
|
||||
VARIABLE_EXPAND, VARIABLE_EXPAND_SINGLE, bytes2wcstring, decode_byte_from_char,
|
||||
fish_reserved_codepoint, subslice_position, wcs2bytes,
|
||||
BRACE_SPACE, BYTE_MAX, HOME_DIRECTORY, INTERNAL_SEPARATOR, PROCESS_EXPAND_SELF,
|
||||
PROCESS_EXPAND_SELF_STR, UCS2_MAX, VARIABLE_EXPAND, VARIABLE_EXPAND_SINGLE, bytes2wcstring,
|
||||
decode_byte_from_char, fish_reserved_codepoint, subslice_position, wcs2bytes,
|
||||
};
|
||||
use nix::sys::termios::Termios;
|
||||
use std::{
|
||||
|
||||
@@ -106,9 +106,6 @@ fn eq(&self, other: &ExpandResultCode) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
/// The string represented by PROCESS_EXPAND_SELF
|
||||
pub const PROCESS_EXPAND_SELF_STR: &wstr = L!("%self");
|
||||
|
||||
/// Perform various forms of expansion on in, such as tilde expansion (\~USER becomes the users home
|
||||
/// directory), variable expansion (\$VAR_NAME becomes the value of the environment variable
|
||||
/// VAR_NAME), cmdsubst expansion and wildcard expansion. The results are inserted into the list
|
||||
|
||||
@@ -9,10 +9,7 @@
|
||||
common::{valid_var_name, valid_var_name_char},
|
||||
complete::complete_wrap_map,
|
||||
env::{EnvVar, Environment},
|
||||
expand::{
|
||||
ExpandFlags, ExpandResultCode, PROCESS_EXPAND_SELF_STR, expand_one,
|
||||
expand_to_command_and_args,
|
||||
},
|
||||
expand::{ExpandFlags, ExpandResultCode, expand_one, expand_to_command_and_args},
|
||||
function,
|
||||
highlight::file_tester::FileTester,
|
||||
history::all_paths_are_valid,
|
||||
@@ -33,7 +30,8 @@
|
||||
use fish_feature_flags::{FeatureFlag, feature_test};
|
||||
use fish_wcstringutil::string_prefixes_string;
|
||||
use fish_widestring::{
|
||||
ASCII_MAX, EXPAND_RESERVED_BASE, EXPAND_RESERVED_END, L, WExt as _, WString, wstr,
|
||||
ASCII_MAX, EXPAND_RESERVED_BASE, EXPAND_RESERVED_END, L, PROCESS_EXPAND_SELF_STR, WExt as _,
|
||||
WString, wstr,
|
||||
};
|
||||
use std::collections::{HashMap, hash_map::Entry};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user