Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Perl as interactive Shell?

by LanX (Saint)
on May 13, 2017 at 13:17 UTC ( [id://1190188]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl as interactive Shell?
in thread Perl as interactive Shell?

Thanks, but i hope you know that there already exist a wild variety of "solutions"

especially perldebug comes with a variety of unknown goodies, like tab completion, introspection and doc lookup and is backwards compatible.

I once spend time adding patching the debugger to Data::Dump of the evaled line and allowing multiline commands ( talk ... sorry slides are offline ATM)

> It only really implements cd and ls. So you can start the shell and type:

yep, OS independence is nice ... though I'm thinking about reusing Brian's powertools

> The eval which evaluates each line has strict and warnings switched off, so you can use things like barewords. Thus the following also works fine and feels slightly more shell-like:

> cd bin

two problems

  • the Shell code should be production ready, thus allowing cut&paste
  • as soon as you use a path separator like / barewords would fail (parser sees regex)
my idea is to allow a DWIM typing with barewords and path, but to visually translate to correct syntax

i.e. one types

> cd /home/user

but display and history would automatically shows

> cd '/home/user'

(tab completion needs syntax awareness anyway and it'll be a service for people coming from sh)

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^3: Perl as interactive Shell?
by perldigious (Priest) on May 17, 2017 at 13:18 UTC

    Ha, I love it! Need a modular Perl Shell? Why not Zoidberg?

    (V) (;,,;) (V)

    Whoop! Whoop! Whoop! Whoop! Whoop! Whoop! Whoop!

    Just another Perl hooker - Working on the corner... corner conditions that is.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1190188]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-03-28 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found