xref: /titanic_41/usr/src/cmd/tip/cmdtab.c (revision b509e89b2befbaa42939abad9da1d7f5a8c6aaae)
1 /*
2  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 /*
7  * Copyright (c) 1983 Regents of the University of California.
8  * All rights reserved.  The Berkeley software License Agreement
9  * specifies the terms and conditions for redistribution.
10  */
11 
12 #pragma ident	"%Z%%M%	%I%	%E% SMI"
13 
14 #include "tip.h"
15 
16 extern void	shell(int), getfl(int), tip_sendfile(int), chdirectory(int);
17 extern void	finish(int), help(int), pipefile(int), pipeout(int);
18 extern void	consh(int), variable(int), cu_take(int), cu_put(int);
19 extern void	genbrk(int), suspend(int);
20 
21 esctable_t etable[] = {
22 	{ '!',	NORM,	"shell",			 shell },
23 	{ '<',	NORM,	"receive file from remote host", getfl },
24 	{ '>',	NORM,	"send file to remote host",	 tip_sendfile },
25 	{ 't',	NORM,	"take file from remote UNIX",	 cu_take },
26 	{ 'p',	NORM,	"put file to remote UNIX",	 cu_put },
27 	{ '|',	NORM,	"pipe remote file",		 pipefile },
28 	{ 'C',  NORM,	"connect program to remote host", consh },
29 	{ 'c',	NORM,	"change directory",		 chdirectory },
30 	{ '.',	NORM,	"exit from tip",		 finish },
31 	{_CTRL('d'), NORM, "exit from tip",		 finish },
32 	{ '$',	NORM,	"pipe local command to remote host", pipeout },
33 	{_CTRL('y'), NORM, "suspend tip (local only)",	 suspend },
34 	{_CTRL('z'), NORM, "suspend tip (local+remote)", suspend },
35 	{ 's',	NORM,	"set variable",			 variable },
36 	{ '?',	NORM,	"get this summary",		 help },
37 	{ '#',	NORM,	"send break",			 genbrk },
38 	{ 0, 0, 0 }
39 };
40