Commit Graph

25 Commits

Author SHA1 Message Date
Trevor Brown
1580310064 Fix sed command so it handles paths correctly
Fixes #559
2019-10-31 10:56:41 -04:00
OZAWA Sakuro
b26f56692d Surround mutually exclusive arguments with curly braces 2019-09-02 11:55:09 +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
Trevor Brown
fc078c5e72 Implement 'asdf local -p'. 2018-10-19 20:41:49 -04:00
Trevor Brown
631ad8a005 Resolve symlink paths before altering .tool-version files. 2018-06-16 22:59:37 -04:00
Trevor Brown
4efa8a9707 Fix failing test for ASDF_DEFAULT_TOOL_VERSIONS_FILENAME environment variable. 2018-02-12 18:41:27 -05:00
Trevor Brown
ed3a029e86
Merge branch 'master' into env-config-file-location 2018-02-11 17:31:17 -05:00
Trevor Brown
0f48c1861b Remove unnecessary regex from replacement string in regex command. 2018-02-11 15:12:31 -05:00
Mark Villacampa
025bd995d5 add two more cases where we need to specify bening and end of line in the .tool-versions to properly identify plugin names 2017-12-16 02:05:52 +01:00
William Ashton
43fd8c978d Tell sed to create backup files, and the remove them
This seems like the easiest way forward, considering the incompatability between the LInux and MacOS versions of sed.
2017-10-27 10:27:27 -04:00
William Ashton
dc3865c9fd Prevent sed from creating -e backup files. Fixes #242 2017-10-26 15:58:45 -04:00
Jonathan Knapp
20b70bccc7
Remove shebangs from lib files and pass bash dialect to shellcheck 2017-10-01 11:34:35 -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
e814d58da3 Shellcheck all commands 2017-09-04 12:04:56 -05:00
Jonathan Knapp
808a8d48b7
Fix many shellcheck issues; ignore a few others 2017-09-04 10:09:47 -04:00
Daniel Perez
f525ba85ff Fix local and global commands to accept multiple versions 2016-08-30 15:46:14 +09:00
Stratus3D
9407521fbf Fix whitespace bug in 'asdf local'. 2016-08-16 10:54:36 -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
Laurens Duijvesteijn
337b335c4d Check if plugin exists before removing it (#77)
Check if plugin exists before removing it
2016-07-06 08:19:15 +09:00
Akash Manohar
c3765182f8 Merge pull request #51 from tuvistavie/use-multiple-versions
Make it possible to use fallback versions. Thank you @tuvistavie ~!
2016-05-14 15:19:29 +05:30
Daniel Perez
61e014a2d6 Fix local command bug. 2016-05-14 11:11:16 +09:00
Daniel Perez
3e31c40020 Make it possible to use fallback versions. 2016-05-04 02:22:48 +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