SSH Key authentication may be able to do something to that effect. I'll read through NSH to get an idea.
Do we have the ability to require libraries to split up files?
Essentially Piping would be syntactic sugar on command chaining.
v
Let's say we use Ruby for this:
Program = Struct.new(:name, :args)
command = "echo 'one' | grep 'one'"
def prog(commands)
commands.split('|').reverse.map { |program| args = program.split ' '; Program.new(args[0], args[1..-1].join(',')) }
end
def chainify(list)
head, tail = list[0], list[1..-1]
tail.empty? ? "#{head.name}(#{head.args})" : "#{head.name}(#{head.args}, #{chainify(tail)})"
end
puts chainify(prog("echo 'one' | grep 'one'")) # => grep('one', echo('one'))
puts chainify prog("try 'one' 'two' 'three' | grep 'one'") # => "grep('one', try('one','two','three'))"
This necessitates you making the last arg optional, and first class functions of some sort. Of course, it's probably prone to a few bugs as this was a 5 minute one-shot. Of course it's hacky ruby considering everything in Ruby is an object, but I'm mapping more towards something Lua would be more likely to do.
Greenspun would be proud, I just hacked together a slight macro-eval system. Switch puts with eval, and it'd work. What'd suck is if Lua didn't have eval or first class functions.