Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #### CODE BEGINS ###
  2.  
  3. export CURRENT_PROJECT_PATH=$HOME/.current-project
  4.  
  5. function chpwd {
  6. echo $PWD >! $CURRENT_PROJECT_PATH
  7. }
  8.  
  9. current() {
  10. if [[ -f $CURRENT_PROJECT_PATH ]]; then
  11. cd "$(cat $CURRENT_PROJECT_PATH)"
  12. fi
  13. }
  14.  
  15. current
  16.  
  17. ### CODE ENDS ###
  18.  
  19. Put the above code inside .zshrc file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement