lua-users home
lua-l archive

Re: [Proposal] Change default _PROMPT from "> " to "> " (two spaces)

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Sorry for the top post.
I'm not sure I'm keen on this solution but the cut paste struggle is 'real'. 
‎
I either loose the first character or have to delete all the extra chevrons. The extra space would mean I have to delete two spaces when I copy one liners. 
If I'm honest the space between the REPL and the first character bugs me too. ‎
My preference would instead consist of  being able to dump the console history for the session or even just the last successful chunk:
Print_last_chunk()
Save_last_chunk(filename)
(The capital letters in the names are my email clients idea).
I'll bet that's already an available pattern.  If I were implementing it I would add a console class that has various facilities only available through interactive mode. 
I expect Steve Donavan to pipe up here and say he's got that written somewhere. I seem to think of things he's already invented. :P 
Russ
Sent from my BlackBerry 10 smartphone on the Virgin Mobile network.
  Original Message  
From: Soni "They/Them" L.
Sent: Saturday, February 3, 2018 8:11 AM
To: Lua mailing list
Reply To: Lua mailing list
Subject: [Proposal] Change default _PROMPT from "> " to "> " (two spaces)
Hi! As you may or may not know, Lua uses _PROMPT and _PROMPT2 in the 
standard REPL (indeed, it's described in the reference manual).
Their default values, e.g. when unset, are "> " and ">> ". There are 
some reasons why this isn't good:
1. Terminals have block selection mode (hold control while selecting). 
The different widths makes this difficult.
2. That's about the only reason.
I propose we change this so the default/fallback _PROMPT and _PROMPT2
are ">  " and ">> " respectively, i.e. they have the same width by 
default. This would work really well with block selection.
-- 
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.

AltStyle によって変換されたページ (->オリジナル) /