Skip to content

PetersTom/to

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To

Change directory to any of your favorite folders with a single short command, wherever your are.

Usage

see SPEC.md, the man page or run

to -h

A short description is provided here:

cd ~/workspace # Directory containing your often accessed folder 'project'
to -a # Adds the current directory to your favorites

cd  ~/somewhere/else/entirely
# Changes the current directory to ~/workspace/project
to project
# Or type:
to proj
# Then press TAB to autocomplete, or press enter for an "I'm feeling lucky"

# List all favorite folders
to -l
# output:
# [0]   /home/you/workspace

# Remove the favorite at index 0
to -r 0

Installation

  • Clone the repository

  • Change the permissions of source.sh to executable

    chmod +x source.sh

  • Run source.sh

    ./source.sh

  • Enjoy jumping to all your favorite directories

source.sh should be ran every time an interactive shell is started because it sets some aliasses. This could be done by adding it to a file that is ran every time an interactive shell is started, for example ~/.profile or ~/.bashrc.

Installing the manpage

First, check where the manpages are stored:

manpath

By default, this should include /usr/local/share/man. This is the common place to install man pages for custom commands. It is possible to save them directly in /usr/share/man and while this would work, it is not the way to go. This is reserved for the package manager and conflicts could arise.

If it does not exist yet, create a directory for custom command man pages

sudo mkdir /usr/local/share/man/man1

Copy the manpage to the newly created directory.

sudo cp to.1 /usr/local/share/man/man1/

Update the manpages database

sudo mandb

Now the manpage should be visible

man to

About

Access your favorite folders, wherever your are

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 39.3%
  • Haskell 19.9%
  • Shell 13.6%
  • Lua 11.1%
  • Python 8.8%
  • Roff 7.3%