diff --git a/42sh/src/exec/exec_leaf.c b/42sh/src/exec/exec_leaf.c index 60f95158..44704e32 100644 --- a/42sh/src/exec/exec_leaf.c +++ b/42sh/src/exec/exec_leaf.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/07 15:47:30 by wescande #+# #+# */ -/* Updated: 2017/03/13 14:13:02 by jhalford ### ########.fr */ +/* Updated: 2017/03/13 14:21:27 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/exec/launch_while.c b/42sh/src/exec/launch_while.c index 81f49a83..7dfafe7d 100644 --- a/42sh/src/exec/launch_while.c +++ b/42sh/src/exec/launch_while.c @@ -6,7 +6,7 @@ /* By: wescande +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/07 17:20:53 by wescande #+# #+# */ -/* Updated: 2017/03/11 17:45:18 by jhalford ### ########.fr */ +/* Updated: 2017/03/13 14:18:07 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/exec/redir_copy.c b/42sh/src/exec/redir_copy.c index 092d4150..055efcd4 100644 --- a/42sh/src/exec/redir_copy.c +++ b/42sh/src/exec/redir_copy.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/08 00:02:58 by ariard #+# #+# */ -/* Updated: 2017/03/13 14:13:24 by jhalford ### ########.fr */ +/* Updated: 2017/03/13 14:20:56 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/exec/set_process.c b/42sh/src/exec/set_process.c index ea0e07fb..4461fc05 100644 --- a/42sh/src/exec/set_process.c +++ b/42sh/src/exec/set_process.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/05 14:54:45 by jhalford #+# #+# */ -/* Updated: 2017/03/13 14:13:25 by jhalford ### ########.fr */ +/* Updated: 2017/03/13 14:18:11 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/history/add_str_in_history.c b/42sh/src/history/add_str_in_history.c index 333f5225..65b7fe8d 100644 --- a/42sh/src/history/add_str_in_history.c +++ b/42sh/src/history/add_str_in_history.c @@ -6,7 +6,7 @@ /* By: gwojda +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/14 11:27:03 by gwojda #+# #+# */ -/* Updated: 2017/03/10 12:59:26 by jhalford ### ########.fr */ +/* Updated: 2017/03/13 14:23:03 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,6 +21,7 @@ void ft_add_in_history_file(char *str) char **hist; i = 0; + /* DG("gonna add [%s] in history"); */ hist = ft_strsplit(str, '\n'); if (!(home = ft_getenv(data_singleton()->env, "HOME"))) return ; diff --git a/42sh/src/main/main.c b/42sh/src/main/main.c index 7037580f..f36d7962 100644 --- a/42sh/src/main/main.c +++ b/42sh/src/main/main.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */ -/* Updated: 2017/03/13 14:12:55 by jhalford ### ########.fr */ +/* Updated: 2017/03/13 14:23:21 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ @@ -75,7 +75,8 @@ int handle_instruction(int fd) if (ft_exec(&ast)) return (1); instruction_free(&token, &parser, &ast); - ft_add_str_in_history(lexer.str); + if (SH_IS_INTERACTIVE(data_singleton()->opts)) + ft_add_str_in_history(lexer.str); return (0); }