Re: CPAN shell command formatting
by Discipulus (Canon) on May 30, 2022 at 06:48 UTC
|
Hello hda,
evidently I dint followed links provided in this reply before posting :)
I dont really know but perhaps CPAN defaults are changed over years
cpan> o conf
...
colorize_debug undef
colorize_output [0]
colorize_print [bold green]
colorize_warn [bold red]
...
If it is not this, check also cpan -v and cpan -V output to spot eventual differences.
HtH
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
| [reply] [d/l] [select] |
|
Thank you, Discipulus
That part looks like this in both cases:
colorize_debug undef
colorize_output [0]
colorize_print undef
colorize_warn undef
| [reply] [d/l] |
Re: CPAN shell command formatting
by LanX (Saint) on May 29, 2022 at 16:04 UTC
|
I'm also ignorant of the CPAN shell, but
- you should tell us the OS and the terminal used.
- probably also check $ENV{TERM} at least the debugger depends on that.
HTH! :)
| [reply] [d/l] |
|
Thanks for your response, Rolf. I use openSUSE (Tumbleweed) Linux, with XFCE desktop environment. $TERM is xterm-256color.
| [reply] |
|
| [reply] |
Re: CPAN shell command formatting
by tybalt89 (Monsignor) on May 30, 2022 at 10:15 UTC
|
It may be whether, or which, Term::ReadLine is installed.
| [reply] |
|
Thank you for this. In both I have Term::ReadLine (1.14) and Term::ReadLine::Perl (1.0303).
A difference is that I have Term::ReadLine::Gnu installed where I have plain characters but NOT in the machine where I see bold command characters. I will explore what may be behind this and eventually report back.
Thank you monks!
This was also pointed out yesterday by Rolf, see above.
| [reply] |
|
Well, I may have found the answer. Obviously reading the documentation :-)
As pointed out by Rolf above (Re^3: CPAN shell command formatting), Term::ReadLine::Gnu and Term::ReadLine::Perl are possibly not entirely compatible. After exporting the variable:
export "PERL_RL=Perl o=1"
Where "o=1" stands for ornaments are activated, which was also the setting in o conf. Things look as I desired now.
Thank you everyone for the kind help! | [reply] [d/l] |
|
Re: CPAN shell command formatting
by Anonymous Monk on May 30, 2022 at 04:03 UTC
|
my $bold = "\e[1m";
my $plain = "\e[m";
print "${bold}Bold text${plain} Plain text\n";
Don't know about the CPAN shell specifically, but if it's to produce "fancy" looking output, it needs to send escape sequences to the terminal, like the ones above... | [reply] [d/l] |
|
So I checked the xfce4-terminal (version 0.8.7.4) and it does have a setting "Allow bold text". When I disable it all bolded text is displayed as plain. It's in Edit -> Preferences -> Appearance. So maybe it's just your terminal.
| [reply] |
|
Yes, I have xfce4-terminal 1.0.3 and that options is available and enabled.
| [reply] |
Re: CPAN shell command formatting
by harangzsolt33 (Chaplain) on May 30, 2022 at 13:55 UTC
|
You do not say what operating system is installed on those two computers. If you use Windows, you can go to the window's header and right-click on it and select Properties. It should be under the Font tab. Finally, when you click on OK, it will ask you if you want to make these changes for this window only or if you want these settings to apply every time for all shell windows.
I like to use the bold large text too, so I changed the font size so that the shell window fills up the whole screen.
If your question is about configuring the syntax highlighting within your text editor so that shell commands (the text within ``) would display in bold, then again, we would need to know which text editor you're using. You didn't mention it. I use Notepad2 in which I Just go to View menu >> Custom Schemes >> Perl Script >> Backticks. And then I enter this: "fore:#FFFFFF; bold;" without the quotes which makes the text appear in bold white letters.
Edit: I just read the comments, and I noticed that you're asking about a Linux system. Sorry. Just ignore my comment. How do I delete what I wrote here? There's an Edit option, but there's no Delete. | [reply] |
|
| [reply] |
|
> BTW, this is now solved.
Next time better reply to the sub-thread which solved it, because it's the first and top-voted reply you got.
So either way people sort they will read that one first, instead of needing to scroll halfway thru. :)
| [reply] |
|
hello harangzsolt33
The op did not supply enough info for you to help them resolve their query...
No need to spend time answering a question the info you reckon they may be relating their question to. I also reccomend avoiding further reflective anguish by previewing your response in your personal scratchpad before posting. It does take a lot of experience to really distingiush the probable info they refer to, and even then its usually a waste of time as users will inevitably have some unique variation that overode their laziness directive into asking the question in the first place.
Also on *Nix type systems you can get a full screen shell window with the Alt+F7 key combo, something akin to Alt+Tabbing on Dos type implementations.
| [reply] |
|
I do not know if it is possible to delete posts here. Moderators surely know. Otherwise do not worry.
| [reply] |
|
| [reply] |