xref: /illumos-gate/usr/src/cmd/tip/cmdtab.c (revision 2a8bcb4e)
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 #include "tip.h"
13 
14 extern void	shell(int), getfl(int), tip_sendfile(int), chdirectory(int);
15 extern void	finish(int), help(int), pipefile(int), pipeout(int);
16 extern void	consh(int), variable(int), cu_take(int), cu_put(int);
17 extern void	genbrk(int), suspend(int);
18 
19 esctable_t etable[] = {
20 	{ '!',	NORM,	"shell",			 shell },
21 	{ '<',	NORM,	"receive file from remote host", getfl },
22 	{ '>',	NORM,	"send file to remote host",	 tip_sendfile },
23 	{ 't',	NORM,	"take file from remote UNIX",	 cu_take },
24 	{ 'p',	NORM,	"put file to remote UNIX",	 cu_put },
25 	{ '|',	NORM,	"pipe remote file",		 pipefile },
26 	{ 'C',  NORM,	"connect program to remote host", consh },
27 	{ 'c',	NORM,	"change directory",		 chdirectory },
28 	{ '.',	NORM,	"exit from tip",		 finish },
29 	{_CTRL('d'), NORM, "exit from tip",		 finish },
30 	{ '$',	NORM,	"pipe local command to remote host", pipeout },
31 	{_CTRL('y'), NORM, "suspend tip (local only)",	 suspend },
32 	{_CTRL('z'), NORM, "suspend tip (local+remote)", suspend },
33 	{ 's',	NORM,	"set variable",			 variable },
34 	{ '?',	NORM,	"get this summary",		 help },
35 	{ '#',	NORM,	"send break",			 genbrk },
36 	{ 0, 0, 0 }
37 };
38