Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Change cd hook in _ssh_hosts



> There are likely more cases than just _ssh_hosts that assume "cd" has
> no side-effects outside the current (sub)shell

That was the intention behind the original email.
I just noticed that there are potential side effects in the completions and wanted to bring that up.

Just a initial search results in these completions using cd:
	Completion/Unix/Command/_ant
	Completion/Unix/Command/_surfraw
	Completion/Unix/Type/_urls
	Completion/Unix/Type/_ssh_hosts
	Completion/Zsh/Command/_cd

> In the meantime I suggest this:
>
> function chpwd() { [[ -o zle ]] && pwd > "$lwd_file" }

Thank you, I was searching for the correct guard to achieve this.






Messages sorted by: Reverse Date, Date, Thread, Author