Commit Graph

47 Commits

Author SHA1 Message Date
ptt-homme 868bc1aff6
add command options for help and version (#53)
* add command options for help and version

* fix tests
2021-04-25 14:16:16 +05:30
ptt-homme 1f28a53597
Add gpg package (#52)
* add GnuPG tools

* clean unneeded space in REGEX for gulp
2020-08-31 09:20:54 +05:30
ptt-homme 41149c3474
support composer (#51) 2020-08-31 09:20:38 +05:30
John-Michael Faircloth 45c4126659
fix TERM env assignment (#50)
incorrect assignment will result in error:

```has: line 14: =xterm: command not found```
2020-08-13 10:31:12 +05:30
Abhishek Anand Amralkar 99595431ff
* add hashicorp tools (#49)
- terraform
- packer
- consul
- nomad
- vagrant
2020-07-17 01:01:20 +05:30
johan-ejstrud 3dd103126e
Add quite mode (#45)
Close #39

Contributed by: Johan Ejstrud <johan@ejstrud.com>
2020-06-20 20:16:48 +05:30
Stephen Dolenc 4ccd0177d4
Verify version for each command (#43)
Thanks to contributions by @sdolenc 

* docker files
* list tools for testing
* test packages
* github actions
* documentation
* ensure expected command count
* output count of individual tools tested
* test: eb rg podman subl brunch grunt gulp heroku netlify sls java brew gor, heroku, mvn, netlify, netlifyctl, php5,  gcloud, hub, coreutils, brunch, code, kotlin, sbt, go, ant, gem, rake, autojump, groovy, aws, perl6, sbt, scala, lein
2020-04-25 16:48:24 +05:30
Jordi Sola 31828ec6bf
Add podman to the list container runtimes (#42) 2020-03-18 11:49:15 +05:30
Cody Hiar 28484822d6 Fix bug when `gor` not installed (#41) 2019-10-08 09:00:12 +05:30
Kunal Dabir bdf7c2ffe6 add doc for contributing more tools 2019-07-24 17:56:04 +05:30
Ashish Mohite 197dce1d03 Support psql (#40)
support for pg client
2019-07-24 17:49:48 +05:30
Kunal Dabir b82d650df0 support docker 2019-07-24 17:29:01 +05:30
Kunal Dabir e9b78acff2 add more tools. wip:organize the tools in groups 2019-07-24 12:34:13 +05:30
Virgil c25ce0eea4 add coreutils and archiving utilities to known commands (#34)
*  🎨 follow Bats coding style for tests

- [x] renamed working directory variable to `HAS_TMPDIR`
- [x] explicitly calling has binary
- [x] Only using `[[ ]]` for regex matches

*  add coreutils and archiving utilities to known commands

- [x] command mapping `*coreutils` to `gnu_coreutils`
- [x]  add test for gnu_coreutils
- [x] 💚 add archiving packages to travis
- [x]  add test for archiving commands

*  add utilities `hub` and `zip`

- [x] add custom processing for `hub` and `zip`
- [x]  add tests for `hub` and `zip`

* adding restyled.io 🔧 config

*  add dynamic `-V` check

- [x] 👌 update 'ab' to use dynamic `-V`
- [x] 👌 update 'go' to use dynamic `arg version`
- [x] 🚨 general whitespace and whitespace in command subsitution
- [x] [SC2004] 🚨 `$`/`${}` is unnecessary on arithmetic variables.
- [x]  make `hub` test conditional on command found
2019-05-21 09:54:40 +05:30
Virgil f5981b9145 Linting with shellcheck (#32)
* [SC2196] Use grep -Eegrep is non-standard and deprecated.

* [SC2086] Double quoting

Double quote to prevent globbing and word splitting.

* [SC2059] printf syntax

Don't use variables in the printf format string.
Use printf "..%s.." "$foo".

Update matching test to not assume whitespace is <space>

* [SC2002] Useless cat.

Consider 'cmd < file | ..' or 'cmd file | ..' instead.

* Update Unicode PASS/FAIL output

- [x] NEW variables for 'checkmark' and 'fancy x' and tput colours
  - [x] eg: `checkmark` = `\342\234\223`
  - [x] eg: `PASS=${txtbold}${txtgreen}${checkmark}${txtreset}`
  - [x] update `printf` statements to use `%b` for unicode variables.
- [x] Using readonly variables for
  - [x] $BINARY_NAME and $VERSION
  - [x] $PASS and $FAIL
- [x] refactor `.hasrc` file reading
  - [x] [SC2002] Useless cat
- [x] Add new BATS tests for Unicode output

* Repo scaffolding - shellscript filetype

- [x] Add shellscripts to `.editorconfig`
- [x] Add shellscripts to `.gitattributes`

* Refactored tests to use consistent unicode glyphs.
2019-04-23 12:08:38 +05:30
Virgil 36e11e238f Freshen Makefile and update README.md (#31)
Details:

* Freshen Makefile and update README.md

- [x] Add `sudo` to revelvant commands
- [x] Use named languages (bash) in fenced codeblocks
- [x] Use `console` in fenced codeblocks for command output

- [x] Use `install` with permission mode

The permissions on `has` were 777 from `git clone`.

- [x] Add option to use $PREFIX

What if I don't want to install to /usr/local/bin?

`make PREFIX=$HOME/.local install` now works.

- [x] Add `update` target for `git pull`
- [x] Include .PHONY targets

* Freshen Makefile and update README.md

- [x] Add `sudo` to revelvant commands
- [x] Use named languages (bash) in fenced codeblocks
- [x] Use `console` in fenced codeblocks for command output

- [x] Use `install` with permissions set

The permissions on `has` were 777 from `git clone`.

- [x] Add option to use $PREFIX

What if I don't want to install to /usr/local/bin?

`make PREFIX=$HOME/.local install` now works.

- [x] Add `update` target for `git pull`
- [x] Include .PHONY targets

- [x] Add tests for Makefile changes
- [x] Uses `bats` variables for directories

- ✓ make install creates a valid installation
- ✓ ..even if has is missing from directory
- ✓ make update runs git pull

* Update .hastest.bats

temp remove "git pull" check.

* Update travis to use bats-core 1.10

Do not be concerned about dirty working tree when running make update.

* Change version output to non-blinking.

* Update travis to use bats-core 1.10

Do not be concerned about dirty working tree when running make update.

* Working makefile

* Use `[[` and `@` for the $lines match.

* `make install` MacOS friendly again
2019-04-04 16:09:17 +05:30
Kunal Dabir 29e5c412d2 release v1.4.0 2018-11-18 17:37:01 +05:30
Kunal Dabir 10c906e7f8 fix regression created with #15. self verion had stopped working. now added a test for it 2018-11-17 11:05:14 +05:30
Kunal Dabir 1702c991ce implements #15
support for .hasrc file in current working directory, from where
has command is fired. these commands are merged with cli args.
2018-11-16 16:01:11 +05:30
Kunal Dabir b60c239bc4 extract magic number into a variable 2018-11-16 12:12:37 +05:30
Kunal Dabir 79f3eb8bba fixes #27 return status code only upto 126 2018-11-16 07:58:05 +05:30
Kunal Dabir 722a5495d6 bump to v1.3.0 2018-11-15 11:57:30 +05:30
Kunal Dabir 4e91758c00 colorize the version as well 2018-11-15 11:53:28 +05:30
Jason Phan 4d1035e241 added: colors (#26)
Support Colors #12 

* added: colors

No more echo with variables in them. Think of it like the Holocaust... Never. Again.

* update: removed color codes from tests
2018-11-15 10:39:17 +05:30
Dan Stewart 86e7a8c4d6 Add perl6 and kotlin 2018-10-26 13:25:51 +01:00
Layik Hama 621616fe56
tiny: add R 2018-09-12 13:17:28 +01:00
Kunal Dabir 0f23f2606d
add project location in script 2018-09-11 20:18:32 +05:30
Kunal Dabir d18ace12fd add some cloud tools 2018-09-11 12:46:16 +05:30
Kunal Dabir 3136085c75 Fix for #22 - let has eat it's own dogfood 2017-12-27 17:47:19 +05:30
Kunal Dabir f6fe16c659 Merge pull request #20 from vimist/More_tools
More tools
2017-10-14 16:18:02 +05:30
Kunal Dabir f5101803f4 Merge pull request #19 from vimist/Treat_SIGPIPE_as_success
Treat SIGPIPE (exit code 141) as a success
2017-10-14 16:16:08 +05:30
vimist dfe466c7bf Added sbt support 2017-10-14 11:12:54 +01:00
vimist d61a4bb457 Added lein support 2017-10-14 11:12:43 +01:00
vimist cf9ea4ce23 Added scala support 2017-10-14 11:12:16 +01:00
vimist f3b243a531 Added php5 support 2017-10-14 11:11:55 +01:00
vimist 1382244c94 Treat SIGPIPE (exit code 141) as a success
If SIGPIPE is received, it doesn't mean that we didn't manage to extract
the version; this change should fix this issue.

This should resolve #18.
2017-10-14 08:53:50 +01:00
Kunal Dabir 0816c04c67 add grunt gulp brunch 2017-10-14 12:56:16 +05:30
Kunal Dabir 8f0ffe8698 add alias for brew 2017-10-14 12:39:14 +05:30
Kunal Dabir dc072fd7d6 add yarn 2017-10-14 12:35:23 +05:30
Kunal Dabir b1fb012bd7 support httpie 2017-10-14 12:29:07 +05:30
Kunal Dabir 2a75f7e763 Add more comments for anyone to follow along what the script does
Also extracted function for commands what expect version as arg
2017-10-14 12:29:07 +05:30
Kunal Dabir 03f2acd57b add gcc make 2017-08-31 23:41:49 +05:30
Kunal Dabir 221cf2b87a more commands 2017-08-31 23:38:22 +05:30
Kunal Dabir 4dddf27108 release 1.0
- added more commands, shuffle the order
- added installation script
- using make to run tests
- update README with installation steps and usage
2017-08-29 12:01:11 +05:30
Kunal Dabir be35ddcfff add more commands 2017-08-29 09:37:37 +05:30
Kunal Dabir 3b6dbf78e4 return exit status based on number of failed commands, 0 means all passed 2017-08-29 09:14:08 +05:30
Kunal Dabir 59a3369956 First cut of `has`
No need to install anything, no need to hit any url. all you need is bash. Many rough edges, many commands missing. there are potential unsafe operations like eval. but still feels much simpler than previous edition.
2017-08-28 21:11:32 +05:30