summaryrefslogtreecommitdiffstats
path: root/src/b_alias.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-15 20:44:45 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-15 20:44:45 +0200
commit33a5806163fb91e4a72e188a9933ada20395f4e9 (patch)
tree24854a47dfc8fd77a0c4bf52c04f7b5c64e48cdc /src/b_alias.c
parentInit fix (diff)
download42-minishell-33a5806163fb91e4a72e188a9933ada20395f4e9.tar.gz
42-minishell-33a5806163fb91e4a72e188a9933ada20395f4e9.tar.bz2
42-minishell-33a5806163fb91e4a72e188a9933ada20395f4e9.tar.xz
42-minishell-33a5806163fb91e4a72e188a9933ada20395f4e9.tar.zst
42-minishell-33a5806163fb91e4a72e188a9933ada20395f4e9.zip
Builtins ref toked
Diffstat (limited to '')
-rw-r--r--src/b_alias.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/b_alias.c b/src/b_alias.c
index daa6e99..5ddc46f 100644
--- a/src/b_alias.c
+++ b/src/b_alias.c
@@ -99,9 +99,11 @@ uint8_t
ret = 0;
if (argc == 0)
{
+ if (msh->alias == NULL)
+ return (0);
b_print_alias_list(msh);
}
- if (argc > 0)
+ else if (argc > 0)
{
i = 0;
while (args[i] != NULL)