mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-16 01:51:16 -03:00
Properly parse spaces and escaped/quoted spaces in expansion braces
This commit is contained in:
@@ -47,13 +47,6 @@ wcstring truncate(const wcstring &input, int max_len, ellipsis_type etype) {
|
||||
}
|
||||
|
||||
wcstring trim(const wcstring &input) {
|
||||
debug(0, "trimming '%ls'", input.c_str());
|
||||
|
||||
// auto begin = input.cbegin();
|
||||
// for (begin; *begin == L' '; ++begin);
|
||||
// auto end = input.cbegin() + input.size();
|
||||
// for (end; end > begin && *end == L' '; ++end);
|
||||
|
||||
auto begin_offset = input.find_first_not_of(whitespace);
|
||||
if (begin_offset == wcstring::npos) {
|
||||
return wcstring{};
|
||||
|
||||
Reference in New Issue
Block a user