🔨」 fix: Fixed prompt with env function

This commit is contained in:
2024-05-27 19:02:07 +02:00
parent ebe3560d03
commit c6d1149642
4 changed files with 15 additions and 14 deletions

View File

@ -31,9 +31,6 @@
# include "execution.h"
char set_env(char **env, const char *name, char *content);
char *get_hostname(void);
char *get_prompt(void);
char *get_pwd(void);
bool is_str(char *src, char *dst);
#endif

View File

@ -6,13 +6,15 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/19 13:48:05 by adjoly #+# #+# */
/* Updated: 2024/05/19 14:20:45 by adjoly ### ########.fr */
/* Updated: 2024/05/27 18:59:56 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PROMPT_H
# define PROMPT_H
# include "env.h"
/**
* @brief return the short hostname from /etc/hostname
* or return nixos if file doesn't exist or is empty
@ -27,13 +29,13 @@ char *get_hostname(void);
*
* @return (char *) the pwd
*/
char *get_pwd(void);
char *get_pwd(t_env env);
/**
* @brief return the full prompt
*
* @prompt (char *) the prompt
*/
char *get_prompt(void);
char *get_prompt(t_env env);
#endif