mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
Remove redundant variable
normalize_path returns a wcstring, so the check can't fail. Just pass it directly.
This commit is contained in:
@@ -834,11 +834,8 @@ static void expand_home_directory(wcstring &input, const environment_t &vars) {
|
||||
}
|
||||
}
|
||||
|
||||
maybe_t<wcstring> realhome;
|
||||
if (home) realhome = normalize_path(*home);
|
||||
|
||||
if (realhome) {
|
||||
input.replace(input.begin(), input.begin() + tail_idx, *realhome);
|
||||
if (home) {
|
||||
input.replace(input.begin(), input.begin() + tail_idx, normalize_path(*home));
|
||||
} else {
|
||||
input[0] = L'~';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user