Commit Graph

22 Commits

Author SHA1 Message Date
Daniel Perez
e53de6726f Fix asdf shell xx --unset for fish 2020-01-25 20:42:43 +00:00
Victor Hugo Borja
e968fe6142 Subcommand-aware command line interface. 2019-11-27 12:17:17 -06:00
OZAWA Sakuro
bc309c0fe5 Remove quotes from --unset option 2019-09-02 11:55:42 +09:00
OZAWA Sakuro
503263a68d Add --unset option to shell command 2019-08-17 22:46:00 +09:00
Jonathan Mast
9116e8453d
Add "shell" subcommand for setting versions in shell session
Add a "shell" command similar to the existing "global" and "local"
commands, which sets the version in an environment variable instead of
writing it to a file. This was inspired by the similar functionality in
rbenv.

It works by adding a wrapper function for the asdf command. It forwards
to a "sh-shell" command that returns the exports as shell code which is
then evaled by the wrapper. This is a little gross, but we need to run
the code in the shell context in order to set variables.

Resolves #378
2019-03-09 13:19:33 -05:00
Victor Hugo Borja
9cac0ac50a Faster exec times. Load commands only when nedded.
When testing, use `run asdf` to actually test the command
as the user would invoke it, so that we might catch possible
errors on `bin/asdf`.
2019-01-20 02:13:20 -06:00
Trevor Brown
fc078c5e72 Implement 'asdf local -p'. 2018-10-19 20:41:49 -04:00
Trevor Brown
e8905b42bc Add tests for 'asdf local -p' command. 2018-10-19 20:41:49 -04:00
Trevor Brown
c7fb348ffd Add tests for symlink preservation. 2018-06-16 22:48:16 -04:00
Melissa Xie
f79dda865a Include plugin name in error message if plugin doesn't exist
Previously, if we ran a command like `asdf install` and we encountered a
plugin that didn't exist, asdf produces an error saying "No such
plugin". Without knowing which plugin it could be referring too, we'd
have to manually go through each plugin in `.tool-versions` to find the
culprit.

With this commit, we'll now also include the plugin name as part of the
messaging for easier debugging.
2018-04-30 12:49:40 -04:00
Trevor Brown
ed3a029e86
Merge branch 'master' into env-config-file-location 2018-02-11 17:31:17 -05:00
William Ashton
dc3865c9fd Prevent sed from creating -e backup files. Fixes #242 2017-10-26 15:58:45 -04:00
Hugo Peixoto
15e59686c4 Add support for $ASDF_DEFAULT_TOOL_VERSIONS_FILENAME
Instead of just looking in $HOME/.tool-versions, allow the default
tool-versions file location to be specified through the variable
$ASDF_TOOL_VERSIONS.
2017-09-25 14:26:14 +01:00
Victor Borja
716d8a93cd Allow asdf local and asdf global to take path: versions
When given a path: version, just check that the directory
actually exists.
2016-12-19 00:25:29 -06:00
Daniel Perez
f525ba85ff Fix local and global commands to accept multiple versions 2016-08-30 15:46:14 +09:00
Stratus3D
98265b00ef Add test for 'asdf local' in a directory with a name containing whitespace. 2016-08-16 10:52:37 -04:00
Kevin Rockwood
7517aa3abc Remove getter feature on local and global commands
This simplifies the `local` and `global` commands. `asdf current` should
be sufficient for getting the current version.

closes #80
2016-07-25 09:44:53 +09:00
Kevin Rockwood
0ce18100c5 Use dummy plugin in version_commands test
This adds a helper to install dummy versions. Hopefully it makes the
test setup a little easier to reason about.
2016-07-25 09:40:52 +09:00
Daniel Perez
3af5d21067 Set ASDF_CONCURRENCY when installing 2016-07-01 16:42:59 +09:00
Daniel Perez
61e014a2d6 Fix local command bug. 2016-05-14 11:11:16 +09:00
Daniel Perez
b0513a6da0 Fix local command to support legacy files. 2016-05-03 00:27:52 +09:00
Daniel Perez
784d7e9f34 Add support for local and global commands. 2016-04-25 02:13:09 +09:00