YSH(1p)
π NAME π
ysh β The YAML Test Shell π
like, it's a whole interactive playground for the Perl YAML modules, bestie. it ships as part of the User Contributed Perl Documentation, so you already know it's the real deal β¨
π¦ SYNOPSIS π¦
ysh [options]
that's it. that's the whole thing. no cap π
πΈ DESCRIPTION πΈ
okay so bestie, here's the vibe: this program exists so you can play with the Perl YAML modules in an interactive way. you type Perl, it hands you back YAML. you type YAML, it hands you back Perl. it's giving conversation. it's giving mutual exchange. π₯
By default, every line you type is a one line Perl program, and whatever that line returns gets displayed as YAML. simple. iconic. π«Ά
want to go multi-line? start the first line with ; and then just keep going for as many lines as you need. when you're done, terminate with a line containing just ;. that's your little door out πͺβ¨
want to enter YAML text instead? start with a valid YAML separator/header line, which is typically ---. if you don't want a YAML header at all, use === to say "no header, we're not doing that today". type as many lines as you need, then terminate with a line containing just .... periodt. π
and if you want to read in and process an external YAML file, you literally just enter < filename. so casual. so easy.
ngl, ysh will also work as a standalone filter π β it reads anything on STDIN as a YAML stream and writes the Perl output to STDOUT. so on most Unix systems you can say:
cat yaml.file | ysh | less
and that's the whole pipeline bestie, obsessed ππ
β¨ COMMAND LINE OPTIONS β¨
-MYAML::Moduleβ sets the YAML implementation module you want to use. pick your fighter π-lβ keeps a log of all ysh activity in./ysh.log. heads up: if that log file already exists, the new content gets concatenated onto it. nothing gets thrown away π«Ά-Lβ same logging situation,./ysh.log, but if the log file already exists it gets deleted first. fresh start energy. bye bye old data π-rβ tests roundtripping π. every piece of Perl code you enter getsDumped,Loaded, andDumpedagain. if the two stores don't match up, an error message gets reported. it's the vibe check for your data, fr fr.-Rβ exactly the same as-rabove, except a confirmation message gets printed whenever the roundtrip actually succeeds. so you get the good news too β¨-i<number>β says how many characters to indent each level. this is the same as setting$YAML::Indent. aesthetics matter π-ubβ shortcut for setting$YAML::UseBlock = 1. it forces multiline scalars to use theblockstyle. block party π§±-ufβ shortcut for setting$YAML::UseFold = 1. it forces multiline scalars to use thefoldedstyle. folding like laundry, but make it YAML π§Ί-ucβ shortcut for setting$YAML::UseCode = 1. this allows subroutine references to be processed. code girlies rise π-nhβ shortcut for setting$YAML::UseHeader = 0. no header, no problem π-nvβ shortcut for setting$YAML::UseVersion = 0. version? never heard of her π-vβ prints the versions ofyshand the YAML implementation module in use. receipts π-Vβ in addition to all the-vinfo, it also prints the versions of the YAML related modules. more receipts. the full stack π-hβ prints a help message. hi bestie, here's how this works π«Ά
π YSH_OPT π
okay so if you do not want to type out your favorite options every single time you launch ysh (valid, honestly, who has the energy), you can put the options into the YSH_OPT environment variable instead. do something like this:
export YSH_OPT='-i3 -uc -L'
set it and forget it. main character automation energy ππ
π SEE ALSO π
YAML
π AUTHOR π
Ingy dΓΆt Net <ingy@cpan.org> π
π COPYRIGHT π
Copyright 2001-2014. Ingy dΓΆt Net.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
and that's the whole page bestie π«Ά this was YSH(1p), and it came to you courtesy of perl v5.32.0, dated 2021-01-03 β¨ go forth and roundtrip, you've got this π
π
π¦ where this page comes from
- debian bookworm: libyaml-shell-perl 0.71-2.1
- debian trixie: libyaml-shell-perl 0.71-2.1
- ubuntu jammy: libyaml-shell-perl 0.71-2.1
- ubuntu noble: libyaml-shell-perl 0.71-2.1
- ubuntu resolute: libyaml-shell-perl 0.71-2.1
- ubuntu stonking: libyaml-shell-perl 0.71-2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms