Warp across your filesystem in ~5 ms

WarpDrive: the Go version.

image

What does this do?

Instead of having a huge cd routine to get where you want, with WarpDrive you use short keywords to warp to the directory in ~5 ms.

Help

WarpDrive - Warp across the filesystem instantly

Usage: wd [<pattern> ...]
       wd --list/-l | --help/-h | --version/-v
       wd {--add/-a | --remove/-r} <path>
Options:
   --list/-l     List currently tracked paths along with their frecency scores
   --add/-a      Add a path to the data file (paths will be added automatically)
   --remove/-r   Remove a path from the data file
   --help/-h     Print this help message
   --version/-v  Print the version of WarpDrive installed
Examples:
   wd -l                          # list all tracked paths and scores
   wd                             # cd to home directory
   wd s                           # tries to match 's'
   wd someDir                     # tries to match 'someDir'
   wd some subDir                 # ensures matched path also contains 'some'
   wd /absolute/path/to/someDir   # absolute paths work too
Note:
   When specifying multiple patterns, order does not matter, except for the last pattern.
   WarpDrive will always cd to a directory that matches the last pattern.

Related: https://github.com/quackduck/WarpDrive. That repo has the earlier, slower, Java version of this.

Install directions

If you're a bash or zsh user:

  1. Put bash-zsh-support/wd.sh somewhere you want.
  2. Put . /path/to/wd.sh in your relevant rc/profile file (you know what I mean)
  3. Run go install in this directory
  4. Profit!

If you're a fish user:

  1. Put fish-support/wd-go_on_prompt.fish in ~/.config/fish/conf.d/
  2. Put fish-support/wd.fish in ~/.config/fish/functions/
  3. Run go install in this directory
  4. Profit!

If you use some other shell:

Make a PR to add support for your shell. Adding support for other shells is easier than for similar programs. All you need is:

  1. A way for wd to add a new directory when you use cd

    You can do this with a prompt hook that detects a change in the pwd.

  2. A way for your shell to cd to wd's result, or show its output as needed.

    The wd-go binary returns an exit code of 3 if it wants you to cd to its output. Else, please show the user the output.

See the bash-zsh-support/ and fish-support/ directories for examples of how to do this.

Owner
Ishan Goel
Commits way too rarely, likes math, badminton and code, currently working on an SSH-based chat and doing some stuff for the Dogecoin devs. Part of @hackclub!
Ishan Goel
Similar Resources

A Go filesystem package for working with files and directories

Stowage A Go filesystem package for working with files and directories, it features a simple API with support for the common files and directories ope

May 28, 2021

filesystem for golang

filesystem filesystem for golang installation go get github.com/go-component/filesystem import import "github.com/go-component/filesystem" Usage sup

Nov 1, 2022

A set of io/fs filesystem abstractions and utilities for Go

A set of io/fs filesystem abstractions and utilities for Go

A set of io/fs filesystem abstractions and utilities for Go Please ⭐ this project Overview This package provides io/fs interfaces for: Cloud providers

Nov 19, 2022

Tarserv serves streaming tar files from filesystem snapshots.

tarserv A collection of tools that allow serving large datasets from local filesystem snapshots. It is meant for serving big amounts of data to shell

Jan 11, 2022

Grep archive search in any files on the filesystem, in archive and even inner archive.

grep-archive Grep archive search for string in any files on the filesystem, in archive and even inner archive. Supported archive format are : Tar Form

Jan 26, 2022

A dead simple tool to rename your files for smooth web access!

ffw - Friendly Files for the Web Easily rename files from a folder to be compatible with the web Run ffw and that's it! Installation on macOs brew tap

Jan 31, 2022

A blazingly-fast simple-to-use tool to find duplicate files on your computer, portable hard drives etc.

A fast and simple tool to find duplicate files (photos, videos, music, documents) on your computer, portable hard drives etc.

Jan 9, 2023

Simple but powerful manager for your dotfiles

Simple but powerful manager for your dotfiles

Dotman The dotfile manager you are searching for Version v0.3 [Next] Installer scripts Bug fixes v0.2 [Now] Automatic git support added v0.1 Initial v

Dec 16, 2022

Paste your GitHub Secrets to files

Paste-Secret Paste your GitHub Secrets in files Usage Inputs Required secrets : Secrets ise JSON object array. Holds filename, keys and values which w

Feb 25, 2022
Comments
  • Windows Command Prompt Support

    Windows Command Prompt Support

    I added some batch script to make this project usable on the windows command prompt. I have never written batch script before, so the code is probably pretty messy.

A FileSystem Abstraction System for Go
A FileSystem Abstraction System for Go

A FileSystem Abstraction System for Go Overview Afero is a filesystem framework providing a simple, uniform and universal API interacting with any fil

Jan 9, 2023
A package to allow one to concurrently go through a filesystem with ease

skywalker Skywalker is a package to allow one to concurrently go through a filesystem with ease. Features Concurrency BlackList filtering WhiteList fi

Nov 14, 2022
An implementation of the FileSystem interface for tar files.

TarFS A wrapper around tar.Reader. Implements the FileSystem interface for tar files. Adds an Open method, that enables reading of file according to i

Sep 26, 2022
Takes an input http.FileSystem (likely at go generate time) and generates Go code that statically implements it.

vfsgen Package vfsgen takes an http.FileSystem (likely at go generate time) and generates Go code that statically implements the provided http.FileSys

Dec 18, 2022
memfs: A simple in-memory io/fs.FS filesystem

memfs: A simple in-memory io/fs.FS filesystem memfs is an in-memory implementation of Go's io/fs.FS interface. The goal is to make it easy and quick t

Jan 8, 2023
A Go io/fs filesystem implementation for reading files in a Github gists.

GistFS GistFS is an io/fs implementation that enables to read files stored in a given Gist. Requirements This module depends on io/fs which is only av

Oct 14, 2022
A Small Virtual Filesystem in Go

This is a virtual filesystem I'm coding to teach myself Go in a fun way. I'm documenting it with a collection of Medium posts that you can find here.

Dec 11, 2022
CRFS: Container Registry Filesystem

CRFS: Container Registry Filesystem Discussion: https://github.com/golang/go/issues/30829 Overview CRFS is a read-only FUSE filesystem that lets you m

Dec 26, 2022
Encrypted overlay filesystem written in Go
Encrypted overlay filesystem written in Go

An encrypted overlay filesystem written in Go. Official website: https://nuetzlich.net/gocryptfs (markdown source). gocryptfs is built on top the exce

Jan 8, 2023
Go filesystem implementations for various URL schemes

hairyhenderson/go-fsimpl This module contains a collection of Go filesystem implementations that can discovered dynamically by URL scheme. All filesys

Dec 28, 2022