Add autoenv support #3

Closed
opened 2017-12-03 18:14:18 +00:00 by benie · 1 comment
Owner

Add zsh-autoenv like functionality.
It should support both .enter and .exit scripts.

Nesting of .enter scripts should be considered, is the extra complexity worth
it?

Add [zsh-autoenv](https://github.com/Tarrasch/zsh-autoenv) like functionality. It should support both `.enter` and `.exit` scripts. Nesting of `.enter` scripts should be considered, is the extra complexity worth it?
Author
Owner

Use the chpwd hook to register a handler. In the handler do the following:

  • Loop over previous .enter entries
    • If $PWD is a not a subdirectory of the previous entry? source .exit
  • Look for .enter file
  • If .enter file does not exists? return
  • If the stack already contains the .enter file? return
  • If the .enter file is not authorized? return
  • Finally source .enter
Use the `chpwd` hook to register a handler. In the handler do the following: * Loop over previous `.enter` entries * If `$PWD` is a _not_ a subdirectory of the previous entry? `source .exit` * Look for `.enter` file * If `.enter` file does _not_ exists? `return` * If the stack already contains the `.enter` file? `return` * If the `.enter` file is _not_ authorized? `return` * Finally `source .enter`
benie closed this issue 2018-04-22 18:04:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: config/zsh#3
No description provided.