summaryrefslogtreecommitdiff
path: root/src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exec.c')
-rw-r--r--src/exec.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/exec.c b/src/exec.c
index 0c53971..a65b442 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -15,7 +15,6 @@ void execute_command_pipeline(Pipeline pipeline, int stdin_fd, int stdout_fd, bo
DECLARE_MAYBE(StrPair, MaybeStrPair)
MaybeStrPair parse_assignment(char* token) {
- printf("%s\n", token);
// TODO: ideally shouldn't mutate maybe
if (token == NULL) return (MaybeStrPair){.some = false};
char* eq = strchr(token, '=');
@@ -41,7 +40,6 @@ bool handle_builtin(ExecutableCommand cmd, ShellState* shstate) {
// TODO: if no arg1 -> print alias list
MaybeStrPair m_assignment = parse_assignment(cmd.args[1]);
assert(m_assignment.some);
- printf("%s:%s\n", m_assignment.value.key, m_assignment.value.val);
set_map_pair(&shstate->aliases, m_assignment.value);
return true;
}
@@ -163,6 +161,7 @@ ExecutableCommand process_pl_command(PlCommand pl_cmd, int* pgid, ShellState* sh
push_to_FdRedirectVec(&fd_redirs, fd_redir);
}
+ // TODO: I think dealiasing has certain preconditions, like arg0 not being expanded before(?).
char** args = malloc(sizeof(char*) * (arg_vec.count + 1));
for (int i = 0; i < arg_vec.count; i++) {
if (i == 0) {
@@ -170,9 +169,7 @@ ExecutableCommand process_pl_command(PlCommand pl_cmd, int* pgid, ShellState* sh
MaybeStr m_dealias = get_map_value(&shstate->aliases, arg);
if (m_dealias.some) {
args[0] = m_dealias.value;
- printf("%s\n", args[0]);
} else {
- printf("Nah\n");
args[0] = arg;
}
} else {