Directory per pane
hakunin opened this issue · comments
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.
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?