Comments (2)
I've actually been thinking about this recently ... my new job has a bit of a different workflow that my last, and I've been noticing dirs age out of the datafile earlier than I expect. Pretty much all of the numbers about this were picked arbitrarily, and there's several possibilities for tweaking/improving behavior. I would welcome suggestions from anyone that wishes to experiment, and believes they've found more intuitive 'settings'.
To that end, here's the stuff you can play around with:
-
See the lines:
if( count > 1000 ) { for( i in rank ) print i "|" 0.9*rank[i] "|" time[i] # aging
count
is the sum of all the ranks (how many times you hit enter in a dir) in the datafile. Entries don't start getting aged out until the total rank count exceeds 1000. So, we can raise that number to delay aging.
Whenever the count hits that threshold, every entry in the file is 'aged' by multiplying the rank by '0.9'. So, we can make that number closer to 1 to slow down aging. -
A few lines up:
$2 >= 1 {
When the rank on a directory goes below 1, it is dropped from the datafile. So we can lower that number to keep aged directories from being removed for a while longer.
Some combination of tweaks to these should yield better results for you.
Furthermore, it occurs to me that I don't mess with 'frecency' here, I only use it when weighting directories that are still in the datafile. It's possible that it would be a good idea to use that in aging calculation - but I can't really think of a way to use it that isn't arguably counterproductive.
I don't want to make these things configurable, I prefer z
to be something that just works as intuitively as possible without fiddling, but these aren't very carefully chosen constants and I'm sure they could be better.
from z.
I often run into this issue, I would love to see the time they stay around raised. Is there a good reason to kill any directory you have visited more then say 5 times?
I don't want to make these things configurable, I prefer z to be something that just works as intuitively as possible without fiddling, but these aren't very carefully chosen constants and I'm sure they could be better.
I pull z
in using another tool so I can't easily modify the numbers without having them configurable somehow. Perhaps having an option to switch off removing directories from the index would work.
EDIT: That being said I also like things that just work. Maybe the numbers just need to be tweaked.
from z.
Related Issues (20)
- Suggestion: support c shell
- Sugggestion: make `z` and `z -` work like `cd` and `cd -`
- z history is pruned if a filesystem is not mounted HOT 3
- z:未找到命令
- z makes my terminal freeze
- Getting defining function based on alias `z' error everytime open the terminal
- Suggestion: Going to the next match
- Not working at all ! why? HOT 3
- Mismatch between normal use and completion
- Question: Is this project still maintained HOT 1
- Shell prompt lag in macOS HOT 6
- Does not show autocomplete in Warp terminal HOT 6
- /bin/bash: z: command not found HOT 3
- Repo HOT 1
- If you are typing in Japanese, it will not appear on the command line until you type Enter.
- .z file not getting created HOT 3
- Tab completion stopped working Sonoma HOT 7
- kodi使用手机热点能看直播连接宽带无法播放 HOT 1
- Not working on install HOT 2
- Z v Zoxide... HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from z.