mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:41:42 +08:00
parent
5f3070220a
commit
cc0e366037
|
@ -1116,6 +1116,9 @@ static bool should_import_bash_history_line(const wcstring &line) {
|
|||
if (line.find(L"]]") != std::string::npos) return false;
|
||||
if (line.find(L"((") != std::string::npos) return false;
|
||||
if (line.find(L"))") != std::string::npos) return false;
|
||||
// Skip lines with literal tabs since we don't handle them well and we don't know what they mean.
|
||||
// It could just be whitespace or it's actually passed somewhere (like e.g. `sed`).
|
||||
if (line.find(L"\t") != std::string::npos) return false;
|
||||
|
||||
// Skip lines that end with a backslash. We do not handle multiline commands from bash history.
|
||||
if (line.back() == L'\\') return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user