#cd #cli #unix #mkdir #mixed #together #process

app mkcd

if mkdir and cd were mixed together

8 releases (4 breaking)

0.8.6 Feb 1, 2023
0.8.5 Feb 1, 2023
0.7.0 Feb 1, 2023
0.6.1 Feb 1, 2023
0.1.0 Dec 18, 2022

#359 in Unix APIs

31 downloads per month

MIT/Apache

4KB

mkcd

A cli that does not work;

It does not work because of the way that unix handles processes. When you invoke a command in the CLI, the process that handled that prompt (be it cd or echo)

┌─────────┐ ┌──────────┐ ┌─────────┐ │ │ │ │ │ │ │ shell ├──►│ fork() ├────┬───►│ shell │◄──────────────────────── mkcd canot access this │ │ │ │ │ │ │ │ └────▲────┘ └──────────┘ │ └─────────┘ │ │ │ │ │ │ │ │ │ ┌────────────────┐ ┌─────────────┐ ┌────────┐ │ │ │ │ │ │ │ │ │ └────► copy of shell ├────►│ exec(mkcd) ├─────► mkcd │ │ │ │ │ │ │ │ │ └────────────────┘ └─────────────┘ └─────┬──┘ │ │ │ │ └──────────────────────────────────────────────────────────────────────────────┘

No runtime deps