Skip to content
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

Problem: copy command at line leaves environment variables out #116

Merged
merged 1 commit into from Mar 29, 2018
Merged

Problem: copy command at line leaves environment variables out #116

merged 1 commit into from Mar 29, 2018

Conversation

FrancescElies
Copy link
Collaborator

When I copy a command with prodigy-copy-cmd I would like to get the environmet variables copied to the kill-ring to be able to paste the command directly in a terminal.

This PR adds environment variables to the yank command. Would this make sense to you?

@Fuco1
Copy link
Collaborator

Fuco1 commented Feb 23, 2018

I have an idea. The implementation now assumes the user is using bash/zsh or something like that. If we use env binary (which is I think available everywhere) we can support fish and other non-posix shells too.

It should work like so:

env foo=bar foo2=bar2 binary -arg ....

@FrancescElies
Copy link
Collaborator Author

FrancescElies commented Feb 24, 2018 via email

@FrancescElies
Copy link
Collaborator Author

@Fuco1 env binary added to yank command

Minor thing, I see in travis stub-service --stub-arg & env STUB_ENV_A=a STUB_ENV_B=b stub-service --stub-arg being printed, I believe it's because of the message command inside prodigy-copy-cmd. Shall I do something about it, (see travis-job)?

@Fuco1
Copy link
Collaborator

Fuco1 commented Feb 26, 2018

I don't think that's a big deal if it prints stuff out, but if we absolutely want to keep it quiet there's shut-up package for exactly that

- Implements @Fuco1's idea, using `env` binary to support more shells rather than
  only posix (e.g. fish)

  Posix:     `FLASK_DEBUG=1 FLASK_APP=my_app.py flask run`
  Non-posix: `env FLASK_DEBUG=1 FLASK_APP=my_app.py flask run`

- Adds shut-up test dependency

Solution: add environment variables to the yank command
@FrancescElies
Copy link
Collaborator Author

I don't think that's a big deal if it prints stuff out, but if we absolutely want to keep it quiet there's shut-up package for exactly that

Added shut-up to cask dependencies and updated test, no more prints now

@Fuco1
Copy link
Collaborator

Fuco1 commented Feb 27, 2018

LGTM 👍

@FrancescElies
Copy link
Collaborator Author

How do you feel about this one 🙏 ? ☺️

@Fuco1 Fuco1 merged commit a07c611 into rejeep:master Mar 29, 2018
@Fuco1
Copy link
Collaborator

Fuco1 commented Mar 29, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants