Commit Graph

1088 Commits

Author SHA1 Message Date
Chris Lane 7b4a268ebd fix: resolves #301
Fixes an issue whereby `cheat` would crash when `$EDITOR` (or
equivalent) contained arguments.
2020-02-02 15:56:18 -05:00
Chris Allen Lane f7183aa17a
Merge pull request #536 from chrisallenlane/issue-301
fix: issue #301
2020-02-02 15:54:47 -05:00
Chris Lane 1ce6c29e6a fix: issue #301
Attempts to resolve issue #301, whereby `cheat` fails if `$EDITOR` (or
equivalent) contains flags.
2020-02-02 15:48:45 -05:00
Chris Allen Lane 219db679e1
Merge pull request #535 from chrisallenlane/master
chore: bumps version to 3.5.0
2020-02-02 14:54:46 -05:00
Chris Lane 53177cb09d chore: bumps version to 3.5.0
Squashed commit of the following:

commit 8b74d50f1f
Author: Chris Lane <chris@chris-allen-lane.com>
Date:   Sun Feb 2 14:40:23 2020 -0500

    chore: updates README

    Edits the `README` to provid updated information regarding the shell
    autocompletion scripts and `fzf` integration.

commit 9868ba2d68
Author: Chris Lane <chris@chris-allen-lane.com>
Date:   Sun Feb 2 14:39:04 2020 -0500

    chore: modifies envvar check

    Modifies the `CHEAT_USE_FZF` envvar check within the bash autocompletion
    script for clarity.

commit ac1012f743
Author: Chris Lane <chris@chris-allen-lane.com>
Date:   Sun Feb 2 14:25:34 2020 -0500

    chore: renames autocompletion scripts

    Renames autocompletion scripts to conform with the conventions
    established in `scop/bash-completion`.

commit c8747bd91d
Author: Chris Lane <chris@chris-allen-lane.com>
Date:   Sun Feb 2 14:23:03 2020 -0500

    feat: improved bash autocompletions

    - Dramatically improves quality of bash autocompletions

    - Provides optional integration with `fzf`

commit 825bd0139d
Author: Chris Lane <chris@chris-allen-lane.com>
Date:   Sun Feb 2 09:19:46 2020 -0500

    chore: deletes `fzf.bash`

    Deletes `fzf.bash`, which was always intended to be a temporary
    placeholder anticipating future improvements.
2020-02-02 14:50:16 -05:00
Chris Allen Lane ef7a41f9a9
Merge pull request #533 from chrisallenlane/master
chore: creates `make coverage` target
2020-01-31 14:07:20 -05:00
Chris Lane 008316d030 chore: creates `make coverage` target
Creates a `make coverage` target that generates a unit-testing coverage
report.
2020-01-31 14:01:57 -05:00
Chris Lane a59c019642 chore: removes `bin` directory
Removes the `bin` directory. It has been obsoleted by the `Makefile`,
and no downstream packages appeared to depend on it.
2020-01-31 13:30:21 -05:00
Chris Allen Lane 57225442be
Merge pull request #532 from chrisallenlane/auto-config-bugfix
fix(config generation): issue #501
2020-01-30 20:12:24 -05:00
Chris Lane 2c7ce48859 chore: multi-os builds on travis
Modifies `.travis.yml` to specify that builds be performed on both Linux
and MacOSX. Experimental.
2020-01-30 20:08:11 -05:00
Chris Lane a3fe4f40bb chore: bumps version to 3.4.1 2020-01-30 20:06:06 -05:00
Chris Lane 506fb8be15 fix: XDG_CONFIG_HOME mishandling
Attempts to resolve an issue regarding automatic config file generation,
as referenced in #501. This issue is believed occur when
`XDG_CONFIG_HOME` is unset.
2020-01-30 19:59:35 -05:00
Chris Lane 408e944eea chore: refactors `config.path` (small)
Performs a minor refactoring on `config.Paths` to consistently use
`path.Join` when computing config directory paths. Previously, both
`path.Join` and `fmt.Sprintf` were being used, strictly due to an
oversight.
2020-01-30 19:45:02 -05:00
Chris Lane 8a313b92ca chore: implements unit-tests for `config.Paths` 2020-01-30 19:25:53 -05:00
Chris Lane 6912771c39 chore: refactors `config.Paths`
Refactors the reading of multiple envvars out of `config.Paths` in order
to facilitate cleaner unit-testing.
2020-01-30 18:48:36 -05:00
Chris Allen Lane d4c6200702
Merge pull request #531 from chrisallenlane/auto-config
feat(configs): config auto-generation
2020-01-29 14:22:12 -05:00
Chris Lane 9251849d23 chore: bumps version to 3.4.0 2020-01-29 14:17:06 -05:00
Chris Lane 313b5ebd27 feat: config auto-generation
`cheat` now attempts to auto-generate a config file if one cannot be
found on the filesystem.
2020-01-29 14:08:03 -05:00
Chris Lane ca91b25b02 fix: logging on failed configs
Fixes an issue whereby the error message generated when a config file
could not be loaded (due to a symlink resolution failure) would fail to
print the config file path to `stderr`.
2020-01-29 14:05:27 -05:00
Chris Lane bbf6af50b1 chore: modifies example config
- Generally reduces the complexity demonstrated in the example configs.
  The prior complexity appears to have confused some new users.

- Removes the `dotfiles` references in the example configs. This idiom
  likewise appears to have confused some new users.

- Adds some instruction regarding how to download and configure the
  "community" cheatsheets (`cheat/cheatsheets`).
2020-01-29 14:01:19 -05:00
Chris Lane 9f05442bce fix: Makefile
Resolves an error whereby `make build` would fail to call `go generate`
prior to calling `go build`.
2020-01-29 13:59:31 -05:00
Chris Lane 3fc4c2f89e chore: Makefile
Makes some adjustments to the behaviors of `make tags` and `make
distclean`.
2020-01-29 09:36:59 -05:00
Chris Lane 9e88ff2642 chore: Makefile adjustment
Previously, `build-release` would produce `.gz` files which had the
execute permission set. This modifies the `Makefile` to `chmod -x` the
`.gz` files after compression.
2020-01-29 09:11:06 -05:00
Chris Allen Lane e3764b81e7
3.3.2 (#530)
* chore: trivial Makefile changes

Trivial `Makefile` changes regarding file pathing.

* chore: build flags

- Passes `-trimpath` flag to build tasks

- Creates `make ci` task and modifies `travis.yml` to use it

- Bumps version to `3.3.2`
2020-01-29 08:50:47 -05:00
Chris Allen Lane 3786ac96a5
3.3.1 (#529)
* makefile wip

* feat: adds Makefile

Adds a `Makefile` for managing build-related tasks.

* chore: updates dependencies

* chore: updates dependencies

* chore: updates bin scripts

- Removes `build_release.sh`
- Places deprecation notice in `build_devel.sh`, as its purpose has been
  superceded by the `Makefile`.

* chore: updates bin scripts

- Removes `build_release.sh`
- Places deprecation notice in `build_devel.sh`, as its purpose has been
  superceded by the `Makefile`.

* fix: Makefile

Makes several corrections and improvements to the `Makefile`:

- Previously, the `ifeq` rules were not behaving as intended, due to
  false assumptions regarding how `make` fundamentally behaves.
  Malfunctioning imperative-style programming has been replaced with
  declarative rules to repair this issue.

- Previously, all release executables were zipped after compilation. In
  order to spare non-Windows users from (possibly) needing to install a
  package to unzip the executables, all non-Windows binaries are now
  compressed with `gzip`. (Windows executables are still compressed with
  `zip`.)

- Removes a bit of needlessly verbosity in several rules and paths.

* chore: updates dependencies

* chore: bumps version to 3.3.1
2020-01-25 14:44:51 -05:00
aperum 4cb7a3b42c add FreeBSD to the supported systems in config.Path (#528) 2020-01-25 14:33:15 -05:00
dependabot-preview[bot] ff6a866abe chore(deps): bump gopkg.in/yaml.v2 from 2.2.7 to 2.2.8 (#527)
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.7 to 2.2.8.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.7...v2.2.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-25 14:20:06 -05:00
dependabot-preview[bot] 2e7ccb2a68 chore(deps): bump github.com/mattn/go-isatty from 0.0.11 to 0.0.12 (#526)
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.11 to 0.0.12.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.11...v0.0.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-25 14:19:57 -05:00
Chris Lane 126231db1f feat: makefile release compression
The `Makefile` `build-release` target now zips all executables after
compilation.
2020-01-20 13:54:53 -05:00
Chris Allen Lane 91f0d02de2
v3.3.0 (#525)
* feat: directory-scoped cheatpaths

`cheat` now searches for a `.cheat` directory in the current working
directory. If found, that directory is (temporarily) appended to the slice
of cheatpaths.

* makefile wip

* fix: appeases linter

Appeases linter (`go vet`) by adding quotation marks to YAML struct
tags.

* chore: modifies .gitignore

Adds `tag` to `.gitignore`

* feat: adds Makefile

Adds a `Makefile` for managing build-related tasks.

* chore: documents directory-local paths

Adds documentation regarding the new directory-local cheatpath
functionality.

* chore: updates dependencies

* chore: bumps version to 3.3.0

* chore: updates bin scripts

- Removes `build_release.sh`
- Places deprecation notice in `build_devel.sh`, as its purpose has been
  superceded by the `Makefile`.
2020-01-20 12:34:48 -05:00
Chris Allen Lane 815e714fb4
Merge pull request #523 from cheat/dependabot/go_modules/github.com/alecthomas/chroma-0.7.1
chore(deps): bump github.com/alecthomas/chroma from 0.7.0 to 0.7.1
2020-01-19 17:05:16 -05:00
dependabot-preview[bot] bd3986a051
chore(deps): bump github.com/alecthomas/chroma from 0.7.0 to 0.7.1
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.7.0...v0.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 07:03:22 +00:00
Chris Allen Lane f47b75edc0
Merge pull request #521 from chrisallenlane/master
chore: dependencies and build script
2019-12-28 10:08:32 -05:00
Chris Lane 180ee20f77 chore: bumps version to 3.2.2 2019-12-28 09:58:48 -05:00
Chris Lane 9b86c583f8 chore: updates `chroma` dependency 2019-12-28 09:56:19 -05:00
Chris Lane e1f7828869 Merge branch 'master' of github.com:cheat/cheat into issue-520 2019-12-28 09:54:39 -05:00
Chris Lane 7f3ae2ab30 feat: ARM support
Modifies `bin/build_release.sh` to compile releases for ARM versions 5,
6, and 7.
2019-12-28 09:53:55 -05:00
Chris Allen Lane bbd03a1bb8
Merge pull request #515 from cheat/dependabot/go_modules/github.com/alecthomas/chroma-0.7.0
chore(deps): bump github.com/alecthomas/chroma from 0.6.9 to 0.7.0
2019-12-28 09:53:22 -05:00
Chris Lane 326c54147b chore: updates dependencies 2019-12-28 09:07:37 -05:00
dependabot-preview[bot] efcedaedec
chore(deps): bump github.com/alecthomas/chroma from 0.6.9 to 0.7.0
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.6.9 to 0.7.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.6.9...v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-28 14:06:13 +00:00
Chris Allen Lane 301cbefb0c
Merge pull request #519 from cheat/dependabot/go_modules/github.com/mattn/go-isatty-0.0.11
chore(deps): bump github.com/mattn/go-isatty from 0.0.10 to 0.0.11
2019-12-28 09:04:43 -05:00
dependabot-preview[bot] 9a481f7e75
chore(deps): bump github.com/mattn/go-isatty from 0.0.10 to 0.0.11
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.10 to 0.0.11.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.10...v0.0.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-11 07:07:50 +00:00
Chris Allen Lane e2920bd922
Merge pull request #514 from chrisallenlane/master
fix: colorization errors
2019-11-24 12:17:19 -05:00
Chris Lane 973a1f59ea chore: version bump
Bumps version to `3.2.1`.
2019-11-24 12:03:26 -05:00
Chris Lane 3afea0972c fix: colorization errors
- Corrects an error with `--search`. Previously, `--search` was not
  aware of whether it was outputted to a TTY, and would apply colorization
  at all times. This resulted in unwanted behavior when, for example,
  piping search results into a paginator.

- Corrects an error with `--color`. Previously, `--color` would be
  ignored if output was being written to a non-TTY. This made it
  impossible, for example, to `cheat tar --color | less -R`, as
  colorization would always be stripped. The behavior of `--color` has
  been modified such that it now behaves similarly to `--color=always` in
  other applications.
2019-11-23 13:47:08 -05:00
Chris Allen Lane f86633ca1c
Merge pull request #511 from chrisallenlane/master
Resolves #504
2019-11-20 19:02:50 -05:00
Chris Lane a01a3491a4 chore: version bump
Bumps version to 3.2.0.
2019-11-20 18:56:50 -05:00
Chris Lane daa43d3867 feat: implements filter on `-l`
Implements filtering by pattern with `-l`. Resolves #504.
2019-11-20 18:55:43 -05:00
Chris Lane e94a1e22df chore: updates vendored dependencies 2019-11-20 18:55:24 -05:00
Chris Allen Lane 5046975a0f
Merge pull request #510 from cheat/dependabot/go_modules/gopkg.in/yaml.v2-2.2.7
chore(deps): bump gopkg.in/yaml.v2 from 2.2.5 to 2.2.7
2019-11-20 18:53:54 -05:00