/usr/bin/ysh is in libyaml-shell-perl 0.71-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | #!/usr/bin/perl
use YAML::Shell;
YAML::Shell->run(@ARGV);
=encoding utf8
=head1 NAME
ysh - The YAML Test Shell
=head1 SYNOPSIS
ysh [options]
=head1 DESCRIPTION
This program is designed to let you play with the Perl YAML modules in an
interactive way. When you to type in Perl, you get back YAML. And vice versa.
By default, every line you type is a one line Perl program, the return value of
which will be displayed as YAML.
To enter multi-line Perl code start the first line with ';' and use as many
lines as needed. Terminate with a line containing just ';'.
To enter YAML text, start with a valid YAML separator/header line which is
typically '---'. Use '===' to indicate that there is no YAML header. Enter as
many lines as needed. Terminate with a line containing just '...'.
To read in and process an external YAML file, enter '< filename'. The ysh will
also work as a standalone filter. It will read anything on STDIN as a YAML
stream and write the Perl output to STDOUT. You can say (on most Unix systems):
cat yaml.file | ysh | less
=head1 COMMAND LINE OPTIONS
=over 4
=item -MYAML::Module
Set the YAML implementation module you wish.
=item -l
Keep a log of all ysh activity in './ysh.log'. If the log file already exists,
new content will be concatenated to it.
=item -L
Keep a log of all ysh activity in './ysh.log'. If the log file already exists,
it will be deleted first.
=item -r
Test roundtripping. Every piece of Perl code entered will be Dumped, Loaded,
and Dumped again. If the two stores do not match, an error message will be
reported.
=item -R
Same as above, except that a B<confirmation> message will be printed when the
roundtrip succeeds.
=item -i<number>
Specify the number of characters to indent each level. This is the same as
setting $YAML::Indent.
=item -ub
Shortcut for setting '$YAML::UseBlock = 1'. Force multiline scalars to use
'block' style.
=item -uf
Shortcut for setting '$YAML::UseFold = 1'. Force multiline scalars to use
'folded' style.
=item -uc
Shortcut for setting '$YAML::UseCode = 1'. Allows subroutine references to be
processed.
=item -nh
Shortcut for setting '$YAML::UseHeader = 0'.
=item -nv
Shortcut for setting '$YAML::UseVersion = 0'.
=item -v
Print the versions of ysh and the YAML implementation module in use.
=item -V
In addition to the -v info, print the versions of YAML related modules.
=item -h
Print a help message.
=back
=head2 YSH_OPT
If you don't want to enter your favorite options every time you enter ysh, you
can put the options into the C<YSH_OPT> environment variable. Do something
like this:
export YSH_OPT='-i3 -uc -L'
=head1 SEE ALSO
L<YAML>
=head1 AUTHOR
Ingy döt Net <ingy@cpan.org>
=head1 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 L<http://www.perl.com/perl/misc/Artistic.html>
=cut
|