summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/b_alias.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/b_alias.c b/src/b_alias.c
index 3b70a02..08f40ed 100644
--- a/src/b_alias.c
+++ b/src/b_alias.c
@@ -18,25 +18,52 @@
static void
b_print_alias_list(t_msh *msh)
{
- (void)msh;
+ t_lalias *ptr;
+
+ ptr = msh->alias;
+ while (ptr != NULL)
+ {
+ ft_printf("alias %s='%s'\n", ptr->name, ptr->val);
+ ptr = ptr->next;
+ }
+}
+
+static void
+ b_print_arg(const char arg[], t_msh *msh)
+{
+ char *ptr;
}
uint8_t
b_alias(char *args[], t_msh *msh)
{
const uint64_t argc = u_builtins_get_argc((const char**)args);
+ int32_t i;
if (argc == 0)
{
b_print_alias_list(msh);
}
+ if (argc > 0)
+ {
+ i = 0;
+ while (args[i] != NULL)
+ {
+ b_print_arg(args[i], msh);
+ i++;
+ }
+ }
return (0);
}
uint8_t
b_alias_mute(char *args[], t_msh *msh)
{
- (void)args;
+ const uint64_t argc = u_builtins_get_argc((const char**)args);
+
(void)msh;
+ if (argc > 0)
+ {
+ }
return (0);
}