gufo can cd

I have worked on the implementation of the cd command in gufo and it now works.

Until now, gufo was able to call “external unix command” but cd is not. In sh or bash, “cd” is an internal command from or (or bash). Now Gufo understands it as an internal command.

Of course, you can just, inside a console session run “cd /home” but you can also run it in more complex code such as this one:


let $inspect_src = 
    let $origin = pwd in(
    let $n = cd src in(
    let $r = ls -l in(
    let $n = cd $origin.Cmd.print in(
    $r.Cmd.print))))

Of course, it would be easier do simply "ls src" but this is to demonstrate the ability to cd. For now everything should be done though variables declaration but that why we use $n while we don't need it, but this might change a bit in next version 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *