diff --git a/exec.cpp b/exec.cpp index e282f72fb..599158865 100644 --- a/exec.cpp +++ b/exec.cpp @@ -909,7 +909,6 @@ void exec_job(parser_t &parser, job_t *j) break; } - case INTERNAL_BLOCK: case INTERNAL_BLOCK_NODE: { if (p->next) @@ -930,17 +929,7 @@ void exec_job(parser_t &parser, job_t *j) if (! exec_error) { - if (p->type == INTERNAL_BLOCK) - { - /* The block contents (as in, fish code) are stored in argv0 (ugh) */ - assert(p->argv0() != NULL); - internal_exec_helper(parser, p->argv0(), NODE_OFFSET_INVALID, TOP, process_net_io_chain); - } - else - { - assert(p->type == INTERNAL_BLOCK_NODE); - internal_exec_helper(parser, wcstring(), p->internal_block_node, TOP, process_net_io_chain); - } + internal_exec_helper(parser, wcstring(), p->internal_block_node, TOP, process_net_io_chain); } break; } @@ -1108,7 +1097,6 @@ void exec_job(parser_t &parser, job_t *j) switch (p->type) { - case INTERNAL_BLOCK: case INTERNAL_BLOCK_NODE: case INTERNAL_FUNCTION: { diff --git a/proc.h b/proc.h index a3a2cd1ce..e89184a8f 100644 --- a/proc.h +++ b/proc.h @@ -69,10 +69,6 @@ enum process_type_t A shellscript function */ INTERNAL_FUNCTION, - /** - A block of commands - */ - INTERNAL_BLOCK, /** A block of commands, represented as a node */ INTERNAL_BLOCK_NODE, @@ -100,7 +96,7 @@ enum commands to be evaluated by calling eval. Lastly, this process can be the result of an exec command. The role of this process_t is determined by the type field, which can be one of EXTERNAL, - INTERNAL_BUILTIN, INTERNAL_FUNCTION, INTERNAL_BLOCK, INTERNAL_EXEC. + INTERNAL_BUILTIN, INTERNAL_FUNCTION, INTERNAL_EXEC. The process_t contains information on how the process should be started, such as command name and arguments, as well as runtime @@ -119,9 +115,6 @@ enum If the process is of type INTERNAL_FUNCTION, argv is the argument vector, and argv[0] is the name of the shellscript function. - If the process is of type INTERNAL_BLOCK, argv has exactly one - element, which is the block of commands to execute. - */ class process_t { @@ -146,8 +139,7 @@ public: /** Type of process. Can be one of \c EXTERNAL, \c - INTERNAL_BUILTIN, \c INTERNAL_FUNCTION, \c INTERNAL_BLOCK, - INTERNAL_EXEC + INTERNAL_BUILTIN, \c INTERNAL_FUNCTION, \c INTERNAL_EXEC */ enum process_type_t type;