App-spaceless

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    Although legal in most modern operating system directory names, spaces
    are only frequently encountered in Windows. This can be troublesome for
    some tools that do not take such antics into account. Fortunately,
    Windows provides alternate file and directory names for any name that
    is not compatible with MS DOS. Since spaces were never supported by MS
    DOS we can use these alternate names for tools that don't take spaces
    into account.

    spaceless converts PATH style environment variables on windows into
    equivalents that do not have spaces. By default it uses Shell::Guess to
    make a reasonable guess as to the shell you are currently using (not
    your login shell). You may alternately specify a specific shell type
    using one of the options below.

    spaceless will not convert long directory (non 8.3 format) names that
    do not have spaces, as these are usually handled gracefully by scripts
    that are space challenged.

OPTIONS

 --cmd

README  view on Meta::CPAN

 --list | -l

    Instead of generating a shell configuration, list the directories in
    the given path style variable

 --login

    Use the your default login shell (as determined by Shell::Guess) On
    Unix style systems this consults the GECOS field in the /etc/passwd
    file or uses NIS. On other platforms it may use another means to
    determine your login shell, or simply make an informed guess based on
    the platform.

 --no-cygwin

    Remove any cygwin paths. Has no affect on non cygwin platforms.

 --power

    Generate Power shell configuration

bin/spaceless  view on Meta::CPAN


Although legal in most modern operating system directory names, spaces are only
frequently encountered in Windows.  This can be troublesome for some tools that
do not take such antics into account.  Fortunately, Windows provides alternate 
file and directory names for any name that is not compatible with MS DOS.  Since
spaces were never supported by MS DOS we can use these alternate names for tools
that don't take spaces into account.

L<spaceless> converts PATH style environment variables on windows into equivalents
that do not have spaces.  By default it uses L<Shell::Guess> to make a reasonable
guess as to the shell you are currently using (not your login shell).  You may
alternately specify a specific shell type using one of the options below.

L<spaceless> will not convert long directory (non 8.3 format) names that do not
have spaces, as these are usually handled gracefully by scripts that are space
challenged.

=head1 OPTIONS

=head2 --cmd

bin/spaceless  view on Meta::CPAN


Instead of generating a shell configuration, list the directories
in the given path style variable

=head2 --login

Use the your default login shell (as determined by L<Shell::Guess>)
On Unix style systems this consults the C<GECOS> field in the
C</etc/passwd> file or uses NIS.  On other platforms it may use
another means to determine your login shell, or simply make an
informed guess based on the platform.

=head2 --no-cygwin

Remove any cygwin paths.  Has no affect on non cygwin platforms.

=head2 --power

Generate Power shell configuration

=head2 --sh

t/app_spaceless.t  view on Meta::CPAN

use Capture::Tiny qw( capture capture_stdout );
use Env qw( @PATH );
use File::Temp qw( tempdir );
use Path::Class qw( file dir );
use Config;

subtest 'running_Shell' => sub {
  my($out, $err, $shell) = capture { App::spaceless::_running_shell() };
  note $err if $err;
  isa_ok $shell, 'Shell::Guess';
  note "guessed shell = ", $shell->name;
};

subtest '--version' => sub {
  my($out, $err, $ret) = capture { App::spaceless->main('--version') };
  chomp $out;
  is $ret, 1, 'exit is 1';
  my $ver = $App::spaceless::VERSION // 'dev';
  is $out, "App::spaceless version $ver", 'output';
  is $err, '', 'error';
};



( run in 0.516 second using v1.01-cache-2.11-cpan-748bfb374f4 )