~emersion/mrsh

ref: 4296e38d1fd2c89e36f1c65cd4959c49fd3005d2 mrsh/builtin/unspecified.c -rw-r--r-- 399 bytes View raw
4296e38dDrew DeVault Abort when unspecified commands are attempted 1 year, 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
#include <mrsh/shell.h>
#include <stdlib.h>
#include <stdio.h>
#include "builtin.h"

int builtin_unspecified(struct mrsh_state *state, int argc, char *argv[]) {
	// Ref: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01
	fprintf(stderr, "%s: The behavior of this command is undefined. "
			"This is an error in your script. Aborting.\n", argv[0]);
	exit(1);
}