rejeep / prodigy.el

Manage external services from within Emacs
GNU General Public License v3.0
550 stars 39 forks source link

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

Closed FrancescElies closed 6 years ago

FrancescElies commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

I didn't think about those cases at all, the idea sounds good to me, I'll implement it next week. Matus Goljer notifications@github.com writes:

[ multipart/alternative ] [ text/plain ] 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 ....

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/rejeep/prodigy.el/pull/116#issuecomment-367973104 [ text/html (hidden) ]

FrancescElies commented 6 years ago

@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 commented 6 years ago

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

FrancescElies commented 6 years ago

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 commented 6 years ago

LGTM :+1:

FrancescElies commented 6 years ago

How do you feel about this one 🙏 ? ☺️

Fuco1 commented 6 years ago

Thanks!