skywind3000 / z.lua

:zap: A new cd command that helps you navigate faster by learning your habits.
MIT License
3k stars 141 forks source link

`pushd` not used in input #100

Open mcint opened 4 years ago

mcint commented 4 years ago

I mostly use pushd (aliased as p) in lieu of cd. Z does not currently capture directories accessed via pushd.

I'm looking into changing this and making a PR.

skywind3000 commented 4 years ago

read the manual plz:

https://github.com/skywind3000/z.lua#options

There is a _ZL_CD environment variable can be used to specify cd command:

export _ZL_CD=pushd
strazto commented 4 years ago

regarding this - I use both in different circumstances, but I'd like z.lua to capture for both. Is there any way to allow for that?

phanirithvij commented 2 years ago

@skywind3000 _ZL_CD is ignored for cmd.exe https://github.com/skywind3000/z.lua/blob/35e1199eff62b9a9bbe345d53adc3eee13eb0628/z.lua#L2566

mcint commented 2 years ago

I'm not looking for Z to use pushd, but to recognize pushd'd paths in history.

It's not clear to me in reading the docs or your recommendation, that _ZL_CD has any effect other than Z-Lua using a different command when it changes directory. Unless I'm mistaken and we've miscommunicated, Z still won't update directory entries when I use pushd directly.

This is what I'd like to update.