Add termname

This commit is contained in:
savalet
2025-05-09 17:03:01 +02:00
parent 97c91071d9
commit 612bd09157

21
src/builtins/termname.c Normal file
View File

@@ -0,0 +1,21 @@
/*
** EPITECH PROJECT, 2025
** __
** File description:
** _
*/
#include <stdio.h>
#include "exec.h"
int builtins_termname(ef_t *ef, char **)
{
char *termname = get_env_value(ef->env, "TERM");
if (termname == nullptr)
return RETURN_FAILURE;
printf("%s\n", termname);
return RETURN_SUCCESS;
}