Copyright (c) Hyperion Entertainment and contributors.

Difference between revisions of "UserDoc:Shell"

From AmigaOS Documentation Wiki
Jump to navigation Jump to search
Line 16: Line 16:
   
 
If you issue the '''newshell''' command without an argument, the default value will be used and a shell will be opened positionned at the top left of the screen, with a height of 130 pixels and it will take the width of the screen. The '''newshell''' command can be used with a special argument that describes how the shell should look. This is the WINDOW template that looks like this:
 
If you issue the '''newshell''' command without an argument, the default value will be used and a shell will be opened positionned at the top left of the screen, with a height of 130 pixels and it will take the width of the screen. The '''newshell''' command can be used with a special argument that describes how the shell should look. This is the WINDOW template that looks like this:
CON:[X position]/[Y position]/[width]/[height]/[window title]/[settings]
+
CON:[X]/[Y]/[width]/[height]/[title]/[options]
  +
where:
  +
  +
'''X''' is the number of pixels from the left edge of the screen to
  +
the left border of the console window. Use no value (i.e. //) to
  +
specify the minimum possible pixels. Use the value -1 to
  +
generate a window that is centred horizontally on the screen.
  +
  +
'''Y''' is the number of pixels from the top of the screen to the top
  +
of the console window. Use no value (//) to specify the
  +
minimum possible pixels. Use the value -1 to generate a window
  +
that is centred vertically on the screen.
  +
  +
'''width''' is the width of the console window, in pixels. Use no value
  +
(//) to specify the full width of the screen.
  +
  +
'''height''' is the height of the console window, in pixels. Use no value
  +
(//) to specify minimum possible height.
  +
  +
'''title''' is the text that appears in the console window title bar.
  +
  +
'''options''' You can use here any of the following options:
  +
  +
AUTO
  +
The window automatically appears when the program needs input
  +
or produces output. Selecting the Shell's close gadget closes
  +
the window, but it re-opens immediately since it is expecting
  +
input.
  +
  +
CLOSE
  +
The window has all the standard gadgets, including a close
  +
gadget.
  +
  +
NOCLOSE
  +
The window does not have a close gadget. If you open a console
  +
normally, there is no close gadget. If you open a console
  +
using the AUTO option, there is automatically a close gadget
  +
on the window.
  +
  +
NODEPTH
  +
The window has no window depth gadget.
  +
  +
NODRAG
  +
The window cannot be dragged. It has zoom, depth and sizing
  +
gadgets, but no close gadget.
  +
  +
NOSIZE
  +
The window only has a depth gadget.
  +
  +
NOICONIFY
  +
The window is opened without an iconify gadget. The window can
  +
still be iconified by use of the Right-Amiga/I keyboard shortcut.
  +
  +
WAIT
  +
The window can only be closed by selecting the close gadget or
  +
entering Ctrl-\. If WAIT is the only option, there is no close
  +
gadget.
  +
  +
'''Example:'''
  +
  +
newshell "CON:0/0//300/This is a shell/CLOSE"
  +
  +
Note: double quotes (") are used because there are spaces in the title string.
   
 
== Using a shell ==
 
== Using a shell ==

Revision as of 16:14, 30 July 2012

What is a shell?

A shell is a text based console the user will use to send commands to the computer. Also it is an AmigaOS window created by Intuition.

Starting a shell

Opening a Shell with default settings

You can open a shell doing like this:

  • Double click the Shell icon, that you can find in the System folder of the system partition.

TODO: insert icon image

  • Issue one of the following commands newshell, newcli or cli. As an example, you can use such command in the Execute... requester of the Workbench.

Using settings to customise the shell

If you issue the newshell command without an argument, the default value will be used and a shell will be opened positionned at the top left of the screen, with a height of 130 pixels and it will take the width of the screen. The newshell command can be used with a special argument that describes how the shell should look. This is the WINDOW template that looks like this: CON:[X]/[Y]/[width]/[height]/[title]/[options] where:

X is the number of pixels from the left edge of the screen to the left border of the console window. Use no value (i.e. //) to specify the minimum possible pixels. Use the value -1 to generate a window that is centred horizontally on the screen.

Y is the number of pixels from the top of the screen to the top of the console window. Use no value (//) to specify the minimum possible pixels. Use the value -1 to generate a window that is centred vertically on the screen.

width is the width of the console window, in pixels. Use no value (//) to specify the full width of the screen.

height is the height of the console window, in pixels. Use no value (//) to specify minimum possible height.

title is the text that appears in the console window title bar.

options You can use here any of the following options:

   AUTO
   The window automatically appears when the program needs input
   or produces output. Selecting the Shell's close gadget closes
   the window, but it re-opens immediately since it is expecting
   input.
   CLOSE
   The window has all the standard gadgets, including a close
   gadget.
   NOCLOSE
   The window does not have a close gadget. If you open a console
   normally, there is no close gadget. If you open a console
   using the AUTO option, there is automatically a close gadget
   on the window.
   NODEPTH
   The window has no window depth gadget.
   NODRAG
   The window cannot be dragged. It has zoom, depth and sizing
   gadgets, but no close gadget.
   NOSIZE
   The window only has a depth gadget.
   NOICONIFY
   The window is opened without an iconify gadget. The window can
   still be iconified by use of the Right-Amiga/I keyboard shortcut.
   WAIT
   The window can only be closed by selecting the close gadget or
   entering Ctrl-\. If WAIT is the only option, there is no close
   gadget.

Example:

newshell "CON:0/0//300/This is a shell/CLOSE"

Note: double quotes (") are used because there are spaces in the title string.

Using a shell

A shell being a text only interface you will use it almost exclusively with the keyboard. There are a few graphic elements that will require the use of a mouse: menu items, window sliders, tabs...

TODO: insert shell image with tabs and menus

Menus

Using a shell menus.

Command line editing

Typing commands in a shell.