Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 0 additions & 89 deletions .github/workflows/cygwin.yml

This file was deleted.

13 changes: 7 additions & 6 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ jobs:
fail-fast: false
matrix:
cip_tag:
- static
- "5.37"
- "5.45"
- "5.44"
- "5.42"
- "5.40"
- "5.38"
- "5.36"
- "5.34"
- "5.32"
Expand All @@ -32,14 +35,12 @@ jobs:
- "5.16"
- "5.14"
- "5.12"
- "5.10"
- "5.8"

env:
CIP_TAG: ${{ matrix.cip_tag }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7

- name: Bootstrap CIP
run: |
Expand All @@ -52,7 +53,7 @@ jobs:
cip cache-key

- name: Cache CPAN modules
uses: actions/cache@v2
uses: actions/cache@v6
with:
path: ~/.cip
key: ${{ runner.os }}-build-${{ steps.cache-key.outputs.key }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7

- name: Set up Perl
run: |
Expand All @@ -40,7 +40,7 @@ jobs:
ls -l perlversion.txt

- name: Cache CPAN modules
uses: actions/cache@v1
uses: actions/cache@v6
with:
path: ~/perl5
key: ${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }}
Expand Down
83 changes: 0 additions & 83 deletions .github/workflows/msys2-mingw.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: static

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
perl:

runs-on: ubuntu-latest

env:
CIP_TAG: static

steps:
- uses: actions/checkout@v2

- name: Bootstrap CIP
run: |
curl -L https://raw.githubusercontent.com/uperl/cip/main/bin/github-bootstrap | bash

- name: Build + Test
run: |
cip script
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf

- uses: actions/checkout@v2
- uses: actions/checkout@v7

- name: Set up Perl
run: |
Expand All @@ -43,7 +43,7 @@ jobs:
perl -V > perlversion.txt

- name: Cache CPAN modules
uses: actions/cache@v1
uses: actions/cache@v6
env:
cache-name: cache-cpan-modules
with:
Expand Down
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Revision history for {{$dist->name}}

{{$NEXT}}
- Add unset method to remove environment variables (gh#14, gh#27, gh#30)
- set_alias now accepts an array reference of words, quoting each
one individually so embedded spaces are preserved (gh#17, gh#30)

0.34 2020-02-05 10:20:27 -0700
- Better diagnostics in testing (gh#22)
Expand Down
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Shell::Config::Generate ![linux](https://github.com/plicease/Shell-Config-Generate/workflows/linux/badge.svg) ![macos](https://github.com/plicease/Shell-Config-Generate/workflows/macos/badge.svg) ![windows](https://github.com/plicease/Shell-Config-Generate/workflows/windows/badge.svg) ![cygwin](https://github.com/plicease/Shell-Config-Generate/workflows/cygwin/badge.svg) ![msys2-mingw](https://github.com/plicease/Shell-Config-Generate/workflows/msys2-mingw/badge.svg)
# Shell::Config::Generate ![linux](https://github.com/plicease/Shell-Config-Generate/workflows/linux/badge.svg) ![macos](https://github.com/plicease/Shell-Config-Generate/workflows/macos/badge.svg) ![windows](https://github.com/plicease/Shell-Config-Generate/workflows/windows/badge.svg)

Portably generate config for any shell

Expand Down Expand Up @@ -285,14 +285,39 @@ $config->echo_on;
Turn off the echo off (that is do not put anything at the beginning of
the config) for DOS/Windows configurations (`command.com` or `cmd.exe`).

## unset

```
$config->unset( $name );
```

Unset (remove) an environment variable.

## set\_alias

```perl
$config->set_alias( $alias => $command )
$config->set_alias( $alias => \@command )
```

Sets the given alias to the given command.

`$command` may also be given as an array reference of words
(a command name followed by its arguments). This works just
like the plain string form, except that each word is quoted
individually, so any spaces embedded in a word will be preserved
as part of that word instead of being treated as a word separator.

**note** that `csh` and `tcsh` aliases work by splicing the
alias text back into the command line and splitting it again on
whitespace, with no surviving quoting mechanism, so embedded
spaces in a word cannot be protected on those shells even when
`$command` is given as an array reference. Rather than silently
generating an alias that will not work as expected, `generate`
and `generate_file` will throw an exception with a helpful
message if any word contains a space and the target shell is
`csh` or `tcsh`.

Caveat:
some older shells do not support aliases, such as
the original bourne shell. This module will generate
Expand Down Expand Up @@ -462,7 +487,7 @@ mohawk

# COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Graham Ollis.
This software is copyright (c) 2017-2026 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
6 changes: 2 additions & 4 deletions dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ name = Shell-Config-Generate
author = Graham Ollis <plicease@cpan.org>
license = Perl_5
copyright_holder = Graham Ollis
copyright_year = 2017-2022
copyright_year = 2017-2026

version = 0.34

[@Author::Plicease]
:version = 2.69
:version = 2.79
release_tests = 1
test2_v0 = 1

workflow = linux
workflow = macos
workflow = windows
workflow = cygwin
workflow = msys2-mingw

[Author::Plicease::Core]

Expand Down
Loading
Loading