Skip to content

Latest commit

 

History

History
105 lines (68 loc) · 1.84 KB

README.md

File metadata and controls

105 lines (68 loc) · 1.84 KB

Build Status

SillyCd

iconfinder_kdisknav_1311

The fastest way to type cd command

Usage

Bash

$ c /u/l/b
/usr/local/bin

$ c /l/as/as
/Library/Application Support/App Store

$ c /a/v/c/r/a/e/
/Applications/Visual Studio Code.app/Contents/Resources/app/extensions

Windows

c:\>c /pf/mss/100
c:\Program Files\Microsoft SQL Server\100

c:\>c /pf/mss
c:\Program Files\Microsoft SQL Server

c:\>c /pf/mss/v
C:\Program Files\Microsoft SQL Server Compact Edition\v4.0

Installation

Installation: OSX

  1. Get a binary file
  2. Define a function

Get binary

brew tap wtetsu/sillycd
brew install sillycd

or download and add it to a PATH directory.

Define function

sillycd just writes a matched directory to stdout. If you use sillycd as alternative cd, you have to define a shell function.

# For bash:
function c() {
  d=`sillycd $1`
  if [ $? -eq 0 ]; then
    echo $d
    cd "$d"
  else
    echo "$1: No such file or directory" >&2
  fi
}

Give it a try!

$ c /u/l/b

Installation: Windows

Get files

Download it!

And add these files into a PATH directory.

  • sillycd.exe
  • c.bat

Give it a try!

c:\>c /pf

Rules

  • You have to type the first character of each directory
  • If multiple directories were matched, sillycd selects the most appropriate directory

Third-party data

Images

Folder, lightning, power icon(LGPL)

https://www.iconfinder.com/icons/1311/folder_lightning_power_icon