👋 Hey there, I am Waylon Walker
I am a Husband, Father of two beautiful children, Senior Python Developer currently working in the Data Engineering platform space. I am a continuous learner, and sha
Z(1) User Commands Z(1)
NAME
z - jump around
SYNOPSIS
z [-chlrtx] [regex1 regex2 ... regexn]
AVAILABILITY
bash, zsh
DESCRIPTION
Tracks your most used directories, based on 'frecency'.
After a short learning phase, z will take you to the most 'frecent'
directory that matches ALL of the regexes given on the command line, in
order.
For example, z foo bar would match /foo/bar but not /bar/foo.
OPTIONS
-c restrict matches to subdirectories of the current directory
-e echo the best match, don't cd
-h show a brief help message
-l list only
-r match by rank only
-t match by recent access only
-x remove the current directory from the datafile
EXAMPLES
z foo cd to most frecent dir matching foo
z foo bar cd to most frecent dir matching foo, then bar
z -r foo cd to highest ranked dir matching foo
z -t foo cd to most recently
So now, if I just type projects I'll always go to the ~/Documents/projects folder, but if I type projects img I'll have a good chance of going to the ~/Documents/projects/static/img folder.
The alias is using z, but only to change to a folder under ~/Documents/projects.
I ❤️ aliases
You gotta check out rupa/z. It's not quite as reliable as an alias, it is magical. It's based on your frecently used directories.
z - jump around
Z(1) User Commands Z(1) NAME z - jump around SYNOPSIS z [-chlrtx] [regex1 regex2 ... regexn] AVAILABILITY bash, zsh DESCRIPTION Tracks your most used directories, based on 'frecency'. After a short learning phase, z will take you to the most 'frecent' directory that matches ALL of the regexes given on the command line, in order. For example, z foo bar would match /foo/bar but not /bar/foo. OPTIONS -c restrict matches to subdirectories of the current directory -e echo the best match, don't cd -h show a brief help message -l list only -r match by rank only -t match by recent access only -x remove the current directory from the datafile EXAMPLES z foo cd to most frecent dir matching foo z foo bar cd to most frecent dir matching foo, then bar z -r foo cd to highest ranked dir matching foo z -t foo cd to most recently…I use a combination of z and aliases. E.g.:
So now, if I just type
projectsI'll always go to the~/Documents/projectsfolder, but if I typeprojects imgI'll have a good chance of going to the~/Documents/projects/static/imgfolder.The alias is using z, but only to change to a folder under
~/Documents/projects.I was hopping to see this kind of tools at this post
Otherwise, you could use a better z :)
github.com/ajeetdsouza/zoxide