My AUR helper runs a command to open the package files for inspection before proceeding to build and install. This needs to block, because after the program exits, the AUR helper will ask me to confirm whether to proceed.

Currently I use ranger, which works reasonably well. However it would be more convenient to open a new shell in that directory. That way I can use my regular CLI tools to inspect the build files, and when done, exit the shell with exit or Ctrl+D and end up back at the AUR helper prompt.

How can I launch a shell like zsh, so that it starts in a given working directory, and also blocks the original process?

  • 1
    (cd "/path/to/dir" && zsh) would block ordinarily, but the real question is: how does the AUR helper pass the filename/directory to the program it launches? You might need to write a wrapper script that takes a filename as argument, runs dirname on it to get its directory, then cds into that directory and runs zsh from there.
    – frabjous
    Jun 8, 2022 at 4:33

1 Answer 1


I have since realized that ranger will already do this: Pressing S will drop you into a new shell in the current directory. When you do Ctrl+D in that shell, you go back to ranger, and then you can do q to quit ranger and go back to the AUR helper.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .