File: shell

package info (click to toggle)
ircii 4.4-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 4,256 kB
  • ctags: 2,797
  • sloc: ansic: 36,743; sh: 907; makefile: 483; lex: 16
file content (24 lines) | stat: -rw-r--r-- 675 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# This sets up a shell in an IRCII window.  
# You start it by executing /SHELL.  If creates a window and 
# runs the shell in it, all command from that window go to 
# the shell.  Executing subsequent /SHELL commands makes
# the shell window the current window.  
#
eval assign IRCFLUSH $LIBRARY_PATH/$ARCHITECTURE/flush
assign shell_flag 0
on ^exec_exit shell {
	^window refnum shell kill
	^assign shell_flag 0
}
on ^window_kill shell {
	^exec -kill %shell
	^assign shell_flag 0
}

alias shell if (shell_flag) {^window show shell} {^call_shell}
alias call_shell {
	window new name shell
	exec -name shell -window exec $ircflush $SHELL
	^query %shell
	assign shell_flag 1
}