|
Line 0
Link Here
|
|
|
1 |
Let Alacritty open new instances in the shell's current working directory |
| 2 |
|
| 3 |
https://github.com/jwilm/alacritty/pull/2162 |
| 4 |
|
| 5 |
--- src/event.rs.orig 2019-02-11 23:59:21 UTC |
| 6 |
+++ src/event.rs |
| 7 |
@@ -172,7 +172,11 @@ impl<'a, N: Notify + 'a> input::ActionContext for Acti |
| 8 |
|
| 9 |
#[cfg(unix)] |
| 10 |
let args = { |
| 11 |
- if let Ok(path) = fs::read_link(format!("/proc/{}/cwd", unsafe { tty::PID })) { |
| 12 |
+ #[cfg(not(target_os = "freebsd"))] |
| 13 |
+ let proc_prefix = ""; |
| 14 |
+ #[cfg(target_os = "freebsd")] |
| 15 |
+ let proc_prefix = "/compat/linux"; |
| 16 |
+ if let Ok(path) = fs::read_link(format!("{}/proc/{}/cwd", proc_prefix, unsafe { tty::PID })) { |
| 17 |
vec!["--working-directory".into(), path] |
| 18 |
} else { |
| 19 |
Vec::new() |