From 058491e35baa8bc73e14b48ceb765a3fe3c07e1f Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 6 Oct 2020 17:06:30 +0200 Subject: Added variable terminal size --- src/config.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/config.py') diff --git a/src/config.py b/src/config.py index 47c08cd..0390194 100644 --- a/src/config.py +++ b/src/config.py @@ -6,7 +6,7 @@ # By: charles +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:19 by charles #+# #+# # -# Updated: 2020/09/16 11:33:54 by charles ### ########.fr # +# Updated: 2020/10/06 17:06:17 by cacharle ### ########.fr # # # # ############################################################################ # @@ -15,6 +15,7 @@ ################################################################################ import os +import shutil # run the bonus tests # can be changed with `export MINISHELL_TEST_BONUS=yes` in your shell rc file. @@ -88,3 +89,7 @@ VERBOSE_LEVEL = 1 MINISHELL_ERROR_BEGIN = os.path.basename(MINISHELL_PATH) + ": " REFERENCE_ERROR_BEGIN = REFERENCE_PATH + ": line 0: " + +TERM_COLS = shutil.get_terminal_size().columns +if TERM_COLS < 40: + raise RuntimeError("You're terminal isn't wide enough") -- cgit