Skip to content

dp12/probe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

probe is a bash/zsh function for cd'ing through large directory trees. It can be invoked with the one character command p.

cd + ls can get you by for a while, but when you need to cd /deep/in/the/neck/of/the/woods/, the constant cd'ing + tabbing + ls gets exhausting. You could use nnn, but context switching between nnn and normal shell can be excessive when all you want is a simple cd.

What if you had something that could immediately cd into single directories, or if there are multiple directories, provide you a fzf-powered fuzzy menu to select the directory you want?

That's the gist of probe, which is not quite cd+ls, and not quite nnn/ranger, but something in between.

During a probe session, to cd into directories deeper than one level below the current directory, run Ctrl-F to add one level to the directory candidates.

You can also press Ctrl-H to toggle showing hidden directories.

probe is compatible with bash, zsh, and sh.

Speed Comparison

Here's a comparison of the keystrokes it takes to get into ~/optee/linux/drivers/infiniband/hw with probe, nnn, and cd + ls.

probe

  • keystrokes: 24 (5+5+5+5+4)
  • time: 4.3 seconds

nnn

  • keystrokes: 28 (4+5+5+5+5+4)
  • time: 4.9 seconds
  • NOTE: The run below uses nnn's vim-like "/" search feature; without the search, getting to the destination takes even longer.

cd + ls

  • keystrokes: 64 (9+3+9+3+11+3+14+3+6+3)
  • time: 8.4 seconds
  • NOTE: The run below doesn't show me tab-completing, as this can take longer than just typing out the directory names.

Acknowledgements

Thanks to junegunn for creating fzf, as well as the makers of pixray, with which I created the probe artwork.

About

probe - a new kind of cd+ls

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages