https://github.com/wtetsu/sillycd
📂 The world's shortest cd
https://github.com/wtetsu/sillycd
cd command-line
Last synced: 5 months ago
JSON representation
📂 The world's shortest cd
- Host: GitHub
- URL: https://github.com/wtetsu/sillycd
- Owner: wtetsu
- License: apache-2.0
- Created: 2019-08-07T11:15:09.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-19T03:46:57.000Z (over 3 years ago)
- Last Synced: 2024-06-20T06:27:04.254Z (almost 2 years ago)
- Topics: cd, command-line
- Language: Go
- Homepage:
- Size: 39.1 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.com/wtetsu/sillycd)
# SillyCd

The fastest way to type cd command
# Usage
## Bash
```sh
$ 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
1. Define a function
### Get binary
```sh
brew tap wtetsu/sillycd
brew install sillycd
```
or [download](https://github.com/wtetsu/sillycd/releases/download/v1.0.0/sillycd-v1.0.0-darwin-amd64.zip) 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.
```sh
# 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!](https://github.com/wtetsu/sillycd/releases/download/v1.0.0/sillycd-v1.0.0-windows-amd64.zip)
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