Menu

Tree [2f720c] master /
 History

HTTPS access


File Date Author Commit
 docs 2019-05-08 Sam Newbold Sam Newbold [2f720c] Horrendously out of date documentation in misfo...
 test_files 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 .gitignore 2019-05-09 Sam Newbold Sam Newbold [88f1bd] Selection_read outputs files in sorted order
 COPYING 2006-04-09 Sam Newbold Sam Newbold [b184f4] rwsh v0.1 import
 ChangeLog 2011-03-04 Sam Newbold Sam Newbold [f8b72a] removing unreleased 0.2.1 and 0.2.2 versions fr...
 KnownBugs 2019-02-06 Sam Newbold Sam Newbold [eebd91] Builtins have prototypes-> s/.bad_argc/.bad_args/g
 README 2019-03-17 Sam Newbold Sam Newbold [6c67e0] s/.function_all_flags/.function/g
 arg_script.cc 2019-03-09 Sam Newbold Sam Newbold [f692d8] Semicolon divides statements outside of argfunc...
 arg_script.h 2019-03-09 Sam Newbold Sam Newbold [f692d8] Semicolon divides statements outside of argfunc...
 arg_spec.cc 2019-03-09 Sam Newbold Sam Newbold [f692d8] Semicolon divides statements outside of argfunc...
 arg_spec.h 2019-01-12 Sam Newbold Sam Newbold [fefded] Support .{foo} and [.{bar}]
 argfunction.basic-result 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 argfunction.sh 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 argm.cc 2019-02-06 Sam Newbold Sam Newbold [eebd91] Builtins have prototypes-> s/.bad_argc/.bad_args/g
 argm.h 2019-03-09 Sam Newbold Sam Newbold [f692d8] Semicolon divides statements outside of argfunc...
 argm_star_var.cc 2018-10-30 Sam Newbold Sam Newbold [eb2042] Prototype almost all functions, deprecate non-p...
 boringfile 2011-11-07 Sam Newbold Sam Newbold [18c487] explaining and showing known bug for v0.3
 builtin.cc 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 builtin.h 2019-03-17 Sam Newbold Sam Newbold [6c67e0] s/.function_all_flags/.function/g
 call_stack.cc 2019-01-10 Sam Newbold Sam Newbold [ec8c0c] Statements print output and return control flow
 call_stack.h 2019-01-10 Sam Newbold Sam Newbold [ec8c0c] Statements print output and return control flow
 clock.cc 2008-03-22 Sam Newbold Sam Newbold [86540c] actually adding clock, and documentation
 clock.h 2016-12-21 Sam Newbold Sam Newbold [f30e82] collect_errors_*, .try_catch is a looping const...
 command_stream.cc 2019-03-09 Sam Newbold Sam Newbold [f692d8] Semicolon divides statements outside of argfunc...
 command_stream.h 2019-03-09 Sam Newbold Sam Newbold [f692d8] Semicolon divides statements outside of argfunc...
 counter.rwsh 2019-03-17 Sam Newbold Sam Newbold [f76d94] Don't assume ––init-file flag in rwshrc
 default_stream.cc 2018-06-28 Sam Newbold Sam Newbold [21ec9a] Try readline to resolve getline() conflict with...
 default_stream.h 2018-06-28 Sam Newbold Sam Newbold [21ec9a] Try readline to resolve getline() conflict with...
 deps.mk 2019-01-10 Sam Newbold Sam Newbold [da07be] a thrown exception triggers .failed_substitution
 executable.cc 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 executable.h 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 executable_map.cc 2019-03-17 Sam Newbold Sam Newbold [6c67e0] s/.function_all_flags/.function/g
 executable_map.h 2019-01-10 Sam Newbold Sam Newbold [ec8c0c] Statements print output and return control flow
 file_stream.cc 2018-07-03 Sam Newbold Sam Newbold [16ccd3] Throw from .set rather than returning nonzero ...
 file_stream.h 2018-06-28 Sam Newbold Sam Newbold [21ec9a] Try readline to resolve getline() conflict with...
 function.cc 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 function.h 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 makefile 2019-05-08 Sam Newbold Sam Newbold [2f720c] Horrendously out of date documentation in misfo...
 old_test_quick.sh 2018-11-03 Sam Newbold Sam Newbold [762c9e] Remove leading rwsh from internal function names
 pipe_stream.cc 2018-10-30 Sam Newbold Sam Newbold [eb2042] Prototype almost all functions, deprecate non-p...
 pipe_stream.h 2018-06-28 Sam Newbold Sam Newbold [21ec9a] Try readline to resolve getline() conflict with...
 plumber.cc 2019-01-04 Sam Newbold Sam Newbold [c843b4] if and else must be in same block
 plumber.h 2018-06-28 Sam Newbold Sam Newbold [21ec9a] Try readline to resolve getline() conflict with...
 prototype.cc 2019-03-17 Sam Newbold Sam Newbold [6c67e0] s/.function_all_flags/.function/g
 prototype.h 2019-03-17 Sam Newbold Sam Newbold [6c67e0] s/.function_all_flags/.function/g
 read_dir.cc 2018-11-07 Sam Newbold Sam Newbold [508ceb] Stop using the deprecated readdir_r()
 rwsh.cc 2019-03-09 Sam Newbold Sam Newbold [f692d8] Semicolon divides statements outside of argfunc...
 rwsh_init.cc 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 rwsh_init.h 2019-01-04 Sam Newbold Sam Newbold [c843b4] if and else must be in same block
 rwsh_stream.cc 2018-07-03 Sam Newbold Sam Newbold [16ccd3] Throw from .set rather than returning nonzero ...
 rwsh_stream.h 2018-07-03 Sam Newbold Sam Newbold [16ccd3] Throw from .set rather than returning nonzero ...
 rwshlib.cc 2019-02-06 Sam Newbold Sam Newbold [eebd91] Builtins have prototypes-> s/.bad_argc/.bad_args/g
 rwshlib.h 2019-02-06 Sam Newbold Sam Newbold [eebd91] Builtins have prototypes-> s/.bad_argc/.bad_args/g
 rwshrc 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 rwshrc-basic 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 rwshrc-default 2019-03-17 Sam Newbold Sam Newbold [6c67e0] s/.function_all_flags/.function/g
 selection.cc 2018-12-14 Sam Newbold Sam Newbold [e10137] break&continue with outer variants, sigint throws
 selection.h 2018-10-30 Sam Newbold Sam Newbold [eb2042] Prototype almost all functions, deprecate non-p...
 selection_read.cc 2019-05-09 Sam Newbold Sam Newbold [88f1bd] Selection_read outputs files in sorted order
 substitution_stream.cc 2018-06-28 Sam Newbold Sam Newbold [21ec9a] Try readline to resolve getline() conflict with...
 substitution_stream.h 2018-06-28 Sam Newbold Sam Newbold [21ec9a] Try readline to resolve getline() conflict with...
 test.result 2019-05-09 Sam Newbold Sam Newbold [88f1bd] Selection_read outputs files in sorted order
 test_inconsistent.result 2019-05-09 Sam Newbold Sam Newbold [88f1bd] Selection_read outputs files in sorted order
 test_inconsistent.sh 2019-03-17 Sam Newbold Sam Newbold [6c67e0] s/.function_all_flags/.function/g
 test_init.rwsh 2019-03-17 Sam Newbold Sam Newbold [6c67e0] s/.function_all_flags/.function/g
 test_main.sh 2019-05-09 Sam Newbold Sam Newbold [88f1bd] Selection_read outputs files in sorted order
 test_quick.result 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 test_quick.sh 2019-03-24 Sam Newbold Sam Newbold [2e3078] Prototype bodies of .for .for_each_line and .st...
 test_rwsh_out 2006-09-08 Sam Newbold Sam Newbold [4dd85a] source doesn't do internal functions
 tokenize.cc 2018-10-30 Sam Newbold Sam Newbold [eb2042] Prototype almost all functions, deprecate non-p...
 variable_map.cc 2019-01-15 Sam Newbold Sam Newbold [7308a1] Argfunctions are part of prototypes
 variable_map.h 2019-01-15 Sam Newbold Sam Newbold [7308a1] Argfunctions are part of prototypes

Read Me

rwsh is a shell for Unix-like systems.  

Documentation can be found in the docs directory.  As it is still very much of 
a proof-of-concept, there is no install or configure script.  

It is not intended to be compatible with existing shells, or even to keep their
basic semantics.  So please read at least the "introduction and 
philosophy" document before assuming that you know what a command will do. For
example, rm without arguments may delete files (personally, I use rm without
arguments more often than with them).

Several changes are coming shortly, which may easily break scripts designed for
this version of the shell, including the following.
     *  .while will respond to the .retest_condition exception by testing the
        condition, and ending the loop if it fails, but (unlike .continue)
        continuing with the following statement if it succeeds.
     *  Control flow statements such as .for will also use a prototype for
        the values passed to the argfunction rather than $1.
     *  Functions will be able to take more than one argfunction with string
        arguments being associated with each argfunction. For instance this
        will permit .scope to take several prototypes with an argfunction for
        each prototype, and will run the argfunction for which its arguments
        match the corresponding prototype.
     *  "Soons" will be replaced with "Earlies". The syntax will not
        (necessarily) change, but the meaning will. Rather than & meaning to
        evaluate the first time a containing statement is evaluated and && meaning
        to evaluate the second time a containing statement is evaluated, & will
        mean to evaluate at the beginning of the innermost block, and && will
        mean to evaluate at the beginning of the second most inner block. The
        result will be that wrapping a set of statements in a .scope or
        .collect_errors_* will not require changing the number of ampersands,
        and that the statement ".set FOO &FOO" will have the effect of
        restoring the value that $FOO had at the beginning of the block.
     *  Global variables will be replaced by a heirarchical set of scopes.
        Functions will be declared to place their variables as a child of the
        current scope (leaving none of the current variables immediately
        accessible and combining all of its variables into a single value for
        the current scope), or within the current scope (making all of the
        current variables available and making the function's variables part of
        the same map), or to attempt to do one of those two in the parent
        scope. If there is no parent scope then a .no_more_turtles exception
        will be thrown.
     *  Another use of the multiple argfunctions per statement will be the
        .select_all and .select_last builtins. They will run each of their
        argument functions in parallel, rotating between them when they input
        or output or request to cooperate with peers. .select_all will run
        until all argument functions complete, while .select_last will run
        until the last argument function specified completes, sending a sigpipe
        to any other argfunctions currently running.
     *  Variables and functions will likely share the same namespace, and using
        a function as if it was a variable will be equivalent to calling it
        without arguments. Running .set on such a function will call it with
        the arguments, but will throw an exception if it terminates without
        having the effect of setting the specified value (or throwing an
        exception of its own).
     *  Redirections will be handled by internal functions, so that the effect
	of >foo, or <bar<baz will be something that can change depending upon
	the configuration.
     *  When handling a set of arguments as a whole, rather than as a set of
	words, any excess space that was included when specifying them will be
	included.
     *  .stepwise will step through the argument specifications as well as
        through the statements of a function, permitting one, for example, to
        identify the arguments that make use of a particular variable.
     *  Exception call stacks will include all of the arguments for each
        function at each level of the call stack rather than just the
        executable names.
     *  .run_logic will be replaced by a system that treats .shell as a service
        which includes the request for user input, and which restarts after
        each command. As with .function_not_found, a missing implementation
        will be replaced with a simple implementation.
     *  a "/" will be used to define a heirarchy amongst executables and
	variables. $foo/bar cannot be defined without defining $foo, and it
	will return the portion of $foo that immediately follows "bar=".
	Running "foo bar" will run the function that was named "foo/bar".
     *  Currently, $foo$3 returns the third word of the variable foo. This will
        be replaced with a system of filters, which can be used to select
        members of a structure without being limited to whitespace-delimited
        structures, as well as being able to optionally handle variables that
        are not defined.
     *  There will be "default redirections", so that interactive commands will
	not necessarily have either their input or output connected to the
	terminal. The builtin .is_default_input should be used to determine
	whether a command is receiving its input effectively from the user, and
	.is_default_output should be used to determine whether output is
	intended to be printed on the terminal.
Other large changes are likely. To illustrate, before version 0.3, ERRNO was a
special variable, that would prevent the execution of control flow statements
such as .if and .while. Experience working with this setup convinced me that
the problem I was aiming at was worth taking on, but that my first solution was
actually an enormous pain most of the times it came up. I could very easily
come to the same conclusion about some other feature that I have already
implemented or will soon implement.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.