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

Change root behaviour: relative to current directory if a relative path is defined #143

Open
froblesmartin opened this issue Jan 31, 2024 · 1 comment

Comments

@froblesmartin
Copy link

Hi there! First of all, thanks for the nice and simple solution! 😄

Now, my use case is that I open a bunch of microservices, each in a folder and run them in development mode.

I have set up the file iTermocil.yml in my repository so that everybody can just run itermocil and get everything running.

The situation I have faced is that each developer can have the repository checked out in a different path, so for root we can not use anything. Initially, I configured that as root: . expecting it to work, as itermocil is executed from the repository itself, but itermocil relies on the iTerm behaviour. If the profile is configured to open new tabs in $HOME, it does not work because the . does not point to the repository, just to ., which in that case is the home directory.

I wanted first to discuss the implementation so that if wanted, I could open a PR then.

My proposal is, if root starts with a dot ., make cd move relatively to where itermocil has been invoked, and if it is an absolute path, then just go there.

@froblesmartin froblesmartin changed the title Root to be relative to current directory? Change "root" behaviour: relative to current directory if a relative path is define Jan 31, 2024
@froblesmartin froblesmartin changed the title Change "root" behaviour: relative to current directory if a relative path is define Change root behaviour: relative to current directory if a relative path is define Jan 31, 2024
@froblesmartin froblesmartin changed the title Change root behaviour: relative to current directory if a relative path is define Change root behaviour: relative to current directory if a relative path is defined Jan 31, 2024
@thesunny
Copy link

This is a great idea and is particularly valuable when working in a team.

There are increasingly more monorepo setups where one has to run half a dozen services and these have to be setup at startup time. It's time consuming and error prone.

Would love to be able to use iTermocil in this use case as every repo is at a different location.

As a plus, I feel like this is a great opportunity to grow iTermocil's user base (and perhaps number of contributors!) because it has a viral growth component. If I add it to my team's repo, and it saves everybody a lot of time, the people on the team are all going to end up using iTermocil as well.

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

No branches or pull requests

2 participants