mirror of
https://github.com/Savapitech/42sh.git
synced 2026-03-18 21:50:35 +01:00
Add termname
This commit is contained in:
21
src/builtins/termname.c
Normal file
21
src/builtins/termname.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user