aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/reader.cpp
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-05-14 20:35:54 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-05-14 20:35:54 -0700
commitff1d651415a2752e82ec417294f9bdf8c234c10f (patch)
treef9dce0f5ad2d8a9d160f4090887b34a34fdefcf4 /src/reader.cpp
parent149e601743f2ad85df8a3bd0cc857bfd0387ef67 (diff)
rename get_is_interactive and remove stupid test
I'm doing this as part of fixing issue #2980. The code for managing tty modes and job control is a horrible mess. This is a very tiny step towards improving the situation.
Diffstat (limited to 'src/reader.cpp')
-rw-r--r--src/reader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reader.cpp b/src/reader.cpp
index bd428871..235086c9 100644
--- a/src/reader.cpp
+++ b/src/reader.cpp
@@ -1686,7 +1686,7 @@ static void reader_interactive_destroy() {
void reader_sanity_check() {
// Note: 'data' is non-null if we are interactive, except in the testing environment.
- if (get_is_interactive() && data != NULL) {
+ if (shell_is_interactive() && data != NULL) {
if (data->command_line.position > data->command_line.size()) sanity_lose();
if (data->colors.size() != data->command_line.size()) sanity_lose();
if (data->indents.size() != data->command_line.size()) sanity_lose();
@@ -2217,7 +2217,7 @@ static void reader_super_highlight_me_plenty(int match_highlight_pos_adjust, boo
}
bool shell_is_exiting() {
- if (get_is_interactive())
+ if (shell_is_interactive())
return job_list_is_empty() && data != NULL && data->end_loop;
else
return end_loop;
@@ -3412,7 +3412,7 @@ int reader_read(int fd, const io_chain_t &io) {
int inter = ((fd == STDIN_FILENO) && isatty(STDIN_FILENO));
proc_push_interactive(inter);
- res = get_is_interactive() ? read_i() : read_ni(fd, io);
+ res = shell_is_interactive() ? read_i() : read_ni(fd, io);
// If the exit command was called in a script, only exit the script, not the program.
if (data) data->end_loop = 0;