mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 13:33:02 +08:00
fix handling of empty read history session ID
This commit is contained in:
parent
c6093ad782
commit
68f4e005e4
|
@ -177,8 +177,10 @@ static int read_interactive(wcstring &buff, int nchars, bool shell, bool silent,
|
|||
int exit_res = STATUS_CMD_OK;
|
||||
const wchar_t *line;
|
||||
|
||||
wcstring read_history_ID = history_session_id() + L"_read";
|
||||
wcstring read_history_ID = history_session_id();
|
||||
if (!read_history_ID.empty()) read_history_ID += L"_read";
|
||||
reader_push(read_history_ID.c_str());
|
||||
|
||||
reader_set_left_prompt(prompt);
|
||||
reader_set_right_prompt(right_prompt);
|
||||
if (shell) {
|
||||
|
|
|
@ -1008,8 +1008,6 @@ void exec_job(parser_t &parser, job_t *j) {
|
|||
|
||||
std::string actual_cmd_str = wcs2string(p->actual_cmd);
|
||||
const char *actual_cmd = actual_cmd_str.c_str();
|
||||
|
||||
const wchar_t *reader_current_filename(void);
|
||||
const wchar_t *file = reader_current_filename();
|
||||
|
||||
#if FISH_USE_POSIX_SPAWN
|
||||
|
|
Loading…
Reference in New Issue
Block a user