Difference between revisions of "ChucK/Dev/Shell/doc"

From CSWiki
Jump to: navigation, search
(Introduction)
(Command Summary)
Line 16: Line 16:
  
 
* shell commands  
 
* shell commands  
** <code>vm attach [hostname[:port]]</code> or <code>vm @ [hostname[:port]]</code> attempts to attach to a ChucK VM running on hostname:port.  The default port is 8888.  If no hostname or port is specified, the shell attempts to attach to the in-process VM
+
 
*** prints a success message and the VM reference number for each successful attachment; prints a failure message for each failed attachment
+
*Shred Management
** <code>vm + </code> or <code>vm add</code>
 
*** saves the current VM for later use
 
** <code>vm - [vm_reference]</code> or <code>vm remove [vm_reference]</code>
 
*** removes specified VM--it is no longer on the VM list
 
** <code>vm = [vm_reference]</code> or <code>vm swap [vm_reference]</code>
 
** <code>vms</code> or <code>vm list</code>
 
*** lists all VMs plus the current VM
 
** <code>vm @+ hostname:port</code> adds and attaches the specified VM
 
 
** <code>add [files]</code> or <code>+ [files]</code>
 
** <code>add [files]</code> or <code>+ [files]</code>
 
*** adds [files] to current VM and prints out a shred reference number for each file
 
*** adds [files] to current VM and prints out a shred reference number for each file
Line 33: Line 25:
 
** <code>--</code> (remove shred with highest id)
 
** <code>--</code> (remove shred with highest id)
 
** <code>status</code> or <code>^</code>
 
** <code>status</code> or <code>^</code>
** <code>kill</code> kills the current vm--shuts down the shell too if current_vm is the process vm
+
 
 +
*Shell Management
 
** <code>ls</code> (like unix ls)
 
** <code>ls</code> (like unix ls)
 
** <code>alias</code> and <code>unalias</code> (simple substitution-based, bash-like command aliases)
 
** <code>alias</code> and <code>unalias</code> (simple substitution-based, bash-like command aliases)
Line 39: Line 32:
 
** <code>pwd</code>  
 
** <code>pwd</code>  
 
** <code>cd</code> (change directory, also change current dir for chuck so paths are consistent)
 
** <code>cd</code> (change directory, also change current dir for chuck so paths are consistent)
 +
** <code>close</code> close down shell, keep process VM running
 
** <code>exit</code> exit everything
 
** <code>exit</code> exit everything
** <code>close</code> close down shell, keep process VM running
+
 
* Ge: thoughts on these commands? ^
+
* Virtual Machine Management
** they look great!  few questions/thoughts:
+
** <code>vm attach [hostname[:port]]</code> or <code>vm @ [hostname[:port]]</code> attempts to attach to a ChucK VM running on hostname:port.  The default port is 8888.  If no hostname or port is specified, the shell attempts to attach to the in-process VM
*** depending on the command line flag issued, the shell could automatically attach the most appropriate thing
+
*** prints a success message and the VM reference number for each successful attachment; prints a failure message for each failed attachment
*** (maybe by default, the shell is attached to 'process'
+
** <code>vm + </code> or <code>vm add</code>
*** --local and --process probably don't need to be be flags since they are targets of the attach shell command  (local or process or self may suffice?)
+
*** saves the current VM for later use
*** the multiple attached target vms is totally cool!
+
** <code>vm - [vm_reference]</code> or <code>vm remove [vm_reference]</code>
 +
*** removes specified VM--it is no longer on the VM list
 +
** <code>vm = [vm_reference]</code> or <code>vm swap [vm_reference]</code>
 +
** <code>vms</code> or <code>vm list</code>
 +
*** lists all VMs plus the current VM
 +
** <code>vm @+ hostname:port</code> adds and attaches the specified VM
 +
** <code>kill</code> kills the current vm--shuts down the shell too if current_vm is the process vm
  
 
== Inline Coding ==
 
== Inline Coding ==

Revision as of 15:23, 2 March 2006

Introduction

The ChucK shell provides a simple, built-in way to add and modify programs on-the-fly and to manage ChucK sessions.

Command Line Options

--shell

Opens ChucK shell and starts the virtual machine.

--empty

Opens a ChucK shell without a virtual machine.

Command Summary

  • shell commands
  • Shred Management
    • add [files] or + [files]
      • adds [files] to current VM and prints out a shred reference number for each file
    • remove [ids] or - [ids]
    • removeall
    • replace id filename [id filename]...
    • -- (remove shred with highest id)
    • status or ^
  • Shell Management
    • ls (like unix ls)
    • alias and unalias (simple substitution-based, bash-like command aliases)
    • shreds list all shreds on the current VM
    • pwd
    • cd (change directory, also change current dir for chuck so paths are consistent)
    • close close down shell, keep process VM running
    • exit exit everything
  • Virtual Machine Management
    • vm attach [hostname[:port]] or vm @ [hostname[:port]] attempts to attach to a ChucK VM running on hostname:port. The default port is 8888. If no hostname or port is specified, the shell attempts to attach to the in-process VM
      • prints a success message and the VM reference number for each successful attachment; prints a failure message for each failed attachment
    • vm + or vm add
      • saves the current VM for later use
    • vm - [vm_reference] or vm remove [vm_reference]
      • removes specified VM--it is no longer on the VM list
    • vm = [vm_reference] or vm swap [vm_reference]
    • vms or vm list
      • lists all VMs plus the current VM
    • vm @+ hostname:port adds and attaches the specified VM
    • kill kills the current vm--shuts down the shell too if current_vm is the process vm

Inline Coding

Tutorial 1

Tutorial 2