Skip to content

Releases: hal7df/iash

iash release "Juno"

26 Aug 04:09
Compare
Choose a tag to compare
iash release "Juno" Pre-release
Pre-release

This release overhauls the entire iash API to something much more useful than in releases v0.1 and v0.2 (hence the version bump). As such, this release is completely backwards-incompatible with v0.1 and v0.2. There is still much work to do, but the APIs should now more closely resemble what they will look like on the first stable release.

Quick API Rundown

iash no longer requires you to write the main event loop manually (!!). Instead, iash programs now have a more well-defined structure:

  1. Each command that the user can run is implemented as a subclass of Command, which has two pure virtual methods getName() and run() that need to be overridden for the command to work properly. Command has a few other virtual methods that can be overridden for extra command validation functionality.
  2. All commands are registered with the shell instance using the templated addCommand() function in the iash class.
  3. After all commands are registered, the runInteractive() and runScript() functions of the shell object can be used to create the shell. Ideally, these functions should be the return value for main, as these will return the exit code of the shell.

New Features

  • Directory is a class that provides cross-platform directory traversal and management features.
  • Environment is a class that provides access to the environment variables set on the iash command line (Full command line access is not yet complete)
  • UserCommand is a class that is passed to each command containing the command's arguments, as well as functions to determine which options are present.
  • Windows builds are working, but are still very experimental. Use at your own risk.

Provided commands

Release v0.5 provides only the following commands by default:

  • cat: iash implementation of Unix cat that is almost functionally complete with GNU cat (the -v flag only shows carriage returns)
  • clear: Clears the screen. Currently only works on Unix.
  • echo: Basic implementation of echo (no functional options)
  • exit: Exits the shell, with a specific return value, or 0 if not given.
  • pwd: Prints the shell's current directory.

iash is no longer a preregistered command, although will probably be used in a future release to allow execution of scripts from inside of an iash shell.

iash release "Firmament"

14 Jun 21:23
Compare
Choose a tag to compare

New Features

  • Save/load environment to file
    • Automatically save and load to/from file at $IASH_CONFIG_PATH
    • Function accessible via shell debugger
  • New environment variables (Note: these should NOT be altered -- doing so can lead to undesired behavior)
    • $IASH_CONFIG_PATH (string): The path to which application configuration should be stored.
    • $IASH_DEBUG_ACTIVE (bool): Whether the builtin shell debugger is running or not
  • New library "crosslib.h"
    • Namespace CrossLib
      • void clearScreen(): Clears the screen.
      • int mkdir (const char* path): Create a directory at path.
      • bool isdir (const char* path): Checks if path is a directory.
      • bool isfile (const char* path): Checks if path is a file.
      • std::string getConfigDir(): Returns the platform's default configuration directory.

Improvements

  • Cleaned up shell debugger
    • All environment variable management now uses the command iash env
    • All other contingencies that set things use the set command, display things use the disp command
    • Fixed crash on command not found calls when called from the debugger
  • (Internal only) Function for converting text to environment variable name
  • (Internal only) Function for testing if an environment variable exists

Notes

The iash command is still used to invoke the shell debugger. Programs should ignore the iash command if they receive it.

Using iash

iash does not yet have a build as a system library. In order to use it, download one of the archives below, and extract the 'iash' folder into your project. From there, either set it up using your preferred build method, or, if you are using CMake, add the following lines to your root CMakeLists.txt file:

include_directories(${PROJECT_SOURCE_DIR}/iash)
add_subdirectory(iash)
link_directories(${PROJECT_BINARY_DIR/iash)

and make sure to link the iash target to your executable.

v0.1 "Dawn"

04 Jun 12:26
Compare
Choose a tag to compare

Functionality

  • Basic commandline parser
    • Get vector containing all of the options passed at the commandline
  • Environment variable system
  • Print command not found messages through a simple function
  • Debug console

Notes on use

All programs that use iash must not react to any iash command. This is used to invoke the debug console.

Using iash

iash currently doesn't have a build for the system level. If you want to use iash, download either of the files below and copy the iash folder into your project.