I'm usually using zsh, which provides chpwd () hooks: this is the case: by tying the CDD CD If zsh is automatically changed, then the method calls to chpwd () if it exists. This allows to set the variable and nicknames which depend on the cwd.
Now I want to close my .zshrc of this bit, but found that chpwd () is not recognized by Bash, does the similar functionality already exist? I know that redefining the CD functions (see below), I am still making a target for another superb solution.
function cd () {builtin cd $ @ chpwd} "post-text" itemprop = "Text">
You can get a DEBUG trap or PROMPT_COMMAND .
Example:
trap chpwd DEBUG # calls the function before each command PROMPT_COMMAND = chpwd # Calls the function after each command Note that the function defined in PROMPT_COMMAND is run before every prompt, however, even empty ones .
Comments
Post a Comment