1
0
mirror of https://github.com/KeyZox71/ft_minipowershell.git synced 2025-06-25 02:13:35 +02:00

🏗️」 wip: Work in progress

This commit is contained in:
2024-06-18 12:21:40 +02:00
parent f70c506fed
commit 6ae7296237
13 changed files with 270 additions and 42 deletions

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/02 14:42:00 by adjoly #+# #+# */
/* Updated: 2024/05/27 19:00:47 by adjoly ### ########.fr */
/* Updated: 2024/06/11 16:04:42 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -25,7 +25,7 @@ char *get_pwd(t_env env)
home = env_get_value("HOME", &env);//getenv("HOME");
if (!pwd)
return (NULL);
if (!ft_strncmp(pwd, home, ft_strlen(home)))
if (!ft_strncmp(pwd, home, ft_strlen(home) - 1))
{
pwd += ft_strlen(home);
pwd = ft_strjoin("~", pwd);