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

Directory per pane #133

Open
hakunin opened this issue Aug 6, 2019 · 1 comment
Open

Directory per pane #133

hakunin opened this issue Aug 6, 2019 · 1 comment
Assignees

Comments

@hakunin
Copy link

hakunin commented Aug 6, 2019

Hi, I am running a window where four panes, each with different directory.

I do something like this:

windows:
  - name: Server
    focus: true
    root: ~/dev
    layout: tiled
    panes:
      - cd app1 && be rails s
      - cd app2 && be rails s -p 3001
      - cd app1 && be sidekiq
      - cd app2 && be sidekiq

What happens if I kill the server in app1 is when I press arrow up, it suggests cd app1 && be rails s which I cannot run.

I'd like to switch directory before running my server somehow, any ideas?

I could do cd ~/dev/app1 && be rails s which will allow re-running, but if there is more elegant solution I'd love to know.

@remi
Copy link
Owner

remi commented Aug 6, 2019

Hi Michal,

Unfortunately the cd ~/dev/app1 && be rails s solution is the only one that will work for the moment.

There’s the commands key you can use for each pane, like so:

windows:
  - name: Server
    focus: true
    root: ~/dev
    layout: tiled
    panes:
      - commands:
        - cd app1
        - be rails s
      - commands:
        - cd app2
        - be rails s -p 3001
      - commands:
        - cd app1
        - be sidekiq
      - commands:
        - cd app2
        - be sidekiq

But what this will do is join commands with ; instead of && — which is not what you want here.

We could change (or add a new option) this line to join commands with “sending the Enter key” instead of ;.

What do you think?

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

No branches or pull requests

2 participants