A massive expansion on previous trials, this is an Perl implementation of an entire basic shell. It’s also on Github.
Brief overview of non-standard features:
- ‘!’ executes last command, ‘!#’ executes a specific command from history, specified by #.
- ‘* newprompt’ changes prompt to newprompt.
- ‘file filename.leshell’ executes the semicolon separated commands in the file.
There are two main issues and I’m offering an immediate 10 bonus points for an explanation!
- ‘bye’ doesn’t exit immediately if any error occurred.
- catching ^c (interupt) only works once.