'alphaed' help
Name:alphaed
Version:0.1
Last update:2021-05-21 14:43:29






This file documents the command line tool alphaed provided by Alpha. This is a shell command that lets you edit files in Alpha from a Terminal window or from a shell script.
For a more complete tool that can also open a file at a given line or in a given mode and encoding, see alphac. To edit with Alpha a file located on a remote server through an ssh tunnel, see ralpha.

Usage

The script can be found inside the application bundle in the $APPLICATION/Contents/Resources/Libraries/Extras directory. Here $APPLICATION designates the path of the Alpha application (click here to place the path in the Clipboard).
It is also distributed with Alpha's ExtraTools: click here to download the ExtraTools.
You may copy the script to a location on your shell PATH to make it more easily accessible or just make a soft link pointing to it.
The general syntax of this script is:
alphaed ?-a app? file [file+]
alphaed [-h|-v]
The path of the file(s) may be absolute or relative to the current directory.
The command supports the following options:
-apath of Alpha.app
-hprint help
-vprint version
By default, the command will use whichever instance of Alpha is found by the OS X Launch Services. You can override this behavior by specifying explicitely a path with the -a option. See the Configuration file section below for a more permanent solution.

Configuration file

The alphaed script looks if there exists a configuration file called .alphaed.rc in your home directory. If it finds such a file, it sources its content.
You can use this configuration file to set the environment variable ALPHA_APP to the path of the application. This can be useful if you maintain several versions of Alpha on your machine and want to be sure that the script picks the right one. For instance:
ALPHA_APP=/path/to/my/Alpha.app

Examples

To edit a file:
> alphaed /path/to/some/file 
To edit several files in the current directory:
> alphaed foo.tex foo.bib
The command supports the usual shell syntax to specify several files:
> alphaed foo.{tex,log}
> alphaed foo.*
> alphaed test*.c

Known problems

Please report any problem or bug you encounter to Alpha's Bug Tracker.

License and Disclaimer

Copyright (c) 2018-2021, Bernard Desgraupes.
All rights reserved.
The alphaed package is free software and distributed under the terms of the new BSD license:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BERNARD DESGRAUPES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.