Skip to content

Commit

Permalink
feat(cwd-pane): Keeping the cwd when opening new panes (#691)
Browse files Browse the repository at this point in the history
* feat(cwd-pane): Add a new trait to get the cwd of a given pid

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Allow for setting the cwd when spawning a new terminal

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Add an active_pane field to the Pty struct

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Update Pty with Tab's active pane id

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Refactor spawn_terminal to use cwd by default

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Fix tests and lints

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Fix formatting

* feat(cwd-pane): Refactor child pid fetching to handle errors better

Instead of panicking when transfering the process id of the forked child
command we just return an empty process id.

* feat(cwd-pane): Add non Linux/MacOS targets for the get_cwd method.

This will allow Zellij to compile on non Linux/MacOS targets without
having an inherited cwd.

* feat(cwd-pane): Refactor spawn_terminal method to use ChildId struct.

The spawn_terminal methods been refactored to use the ChildId struct in
order to clarify what the Pid's returned by it are. The documentation
for the ChildId struct was improved as well.

* feat(cwd-pane): Fix tests/lints

Co-authored-by: Jesse Tuchsen <not@disclosing>
Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>
  • Loading branch information
3 people authored Sep 10, 2021
1 parent 26a970a commit 4f94f95
Show file tree
Hide file tree
Showing 9 changed files with 295 additions and 143 deletions.
57 changes: 38 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions zellij-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ license = "MIT"
ansi_term = "0.12.1"
async-trait = "0.1.50"
base64 = "0.13.0"
byteorder = "1.4.3"
daemonize = "0.4.1"
serde_json = "1.0"
unicode-width = "0.1.8"
Expand All @@ -23,6 +24,9 @@ log = "0.4.14"
typetag = "0.1.7"
chrono = "0.4.19"

[target.'cfg(target_os = "macos")'.dependencies]
darwin-libproc = "0.2.0"

[dev-dependencies]
insta = "1.6.0"

Loading

0 comments on commit 4f94f95

Please sign in to comment.