-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command to print all PATH information that can be consumed by the shell #620
Comments
Are you aware of stack path? On Fri, Jul 17, 2015, 8:41 AM Maciej Woś [email protected] wrote:
|
@snoyberg yes, I've seen I just realised that a similar effect can be achieved by issuing |
Would you be interested in taking a stab at a PR for this? |
@snoyberg Sure, I'll take a stab at this once I'll have a free weekend. |
@lostman Does the following command do what you have in mind? $ comm -23 <(stack exec env | sort) <(env | sort) | sed 's/.*/export &;/'
export GHC_PACKAGE_PATH=/home/simon/src/stack/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/pkgdb:/home/simon/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/pkgdb:/home/simon/.stack/programs/x86_64-linux/ghc-7.10.2/lib/ghc-7.10.2/package.conf.d;
export HASKELL_DIST_DIR=.stack-work/dist/x86_64-linux/Cabal-1.22.4.0;
export HASKELL_PACKAGE_SANDBOXES=/home/simon/src/stack/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/pkgdb:/home/simon/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/pkgdb:;
export HASKELL_PACKAGE_SANDBOX=/home/simon/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/pkgdb;
export PATH=/home/simon/src/stack/.stack-work/install/x86_64-linux/lts-3.4/7.10.2/bin:/home/simon/.stack/snapshots/x86_64-linux/lts-3.4/7.10.2/bin:/home/simon/.stack/programs/x86_64-linux/ghc-7.10.2/bin: # snip
export STACK_EXE=/usr/bin/stack;
export _=/usr/bin/stack; |
PR #4642 open. |
Add the config env command (fixes #620)
OCaml's
opam
has a convenient command to setup environment variables:Which can be consumed by:
It would be great if
stack
offered something similar. In particular, when usingstack
-installed GHC one needs to add it toPATH
. Ditto regardingbin/
directory. Whilestack exec foo
works, it is not enough when I want to call more than one binary from a script.stack config env
(or equivalent) could work globally by pointing to the latest GHC version that has been installed and locally in a directory withstack.yaml
by pointing to GHC version that is required to build that particular project.The text was updated successfully, but these errors were encountered: