degica / kaiser

Commandline Gem that allows you to work with web apps better
https://tech.degica.com/kaiser/
MIT License
12 stars 1 forks source link

Sync a .profile for use with bash/sh #35

Closed Resonious closed 6 months ago

Resonious commented 4 years ago

I spend most of my dev time in kaiser up -a bash where the shell is pretty boring. This lets me write a ~/.kaiser_profile that gets loaded into my running containers as .profile (configurable).

Screenshot from 2020-01-10 15-51-27

The colors are great, but really I just didn't want to keep typing set -a vi every time I hop into a Kaiser container.

degicat commented 4 years ago

@Iorin0225 please review this

Iorin0225 commented 4 years ago

I'm looking this now... But this does not work on my local, and It must be because I use mac. I'm investigating this problem...

Resonious commented 4 years ago

Hmm maybe it's because the busybox sh in alpine doesn't load .profile. I'm using https://github.com/degica/kaiser/pull/32 to run a debian-based container. It's also possible that the home directory isn't the same as the workdir.

I'll mess around with this a bit after the weekend.

Iorin0225 commented 4 years ago

My container does not load .profile. And when i put it at /etc/profile, it seems to work correctly.

@shell_rc = '/etc/profile'

Can this help you?

Resonious commented 4 years ago

That's perfect, actually. I totally forgot about /etc/profile.

Iorin0225 commented 4 years ago

Ah, you need to resolve the rubocop... I think resolving Metrics/ClassLength: Class has too many lines. [430/425] may include some changes.

Please let me know if you think this should be review it again!