6 |
7 | Table of Content
8 |
9 |
10 |
11 | * [Demo](#demo)
12 | * [Installation](#installation)
13 | * [Get sd_cL](#get-sd_cl)
14 | * [cURL](#curl)
15 | * [Homebrew at OS X](#homebrew-at-os-x)
16 | * [Download](#download)
17 | * [Set up sd_cl](#set-up-sd_cl)
18 | * [Main commands](#main-commands)
19 | * [sd (Save Directory)](#sd-save-directory)
20 | * [cl (Change to the Last directory)](#cl-change-to-the-last-directory)
21 | * [Usage](#usage)
22 | * [Main functions: sd/cl](#main-functions-sdcl)
23 | * [Use selection mode to select from the list](#use-selection-mode-to-select-from-the-list)
24 | * [Filtering](#filtering)
25 | * [Tab completion](#tab-completion)
26 | * [Jump to N-th directory](#jump-to-n-th-directory)
27 | * [Directory lists](#directory-lists)
28 | * [Last directory list](#last-directory-list)
29 | * [Pre-defined directory list](#pre-defined-directory-list)
30 | * [Window directory list](#window-directory-list)
31 | * [Ranking directory list](#ranking-directory-list)
32 | * [History list (Move Back/Forward in the history)](#history-list-move-backforward-in-the-history)
33 | * [Vim like file explorer](#vim-like-file-explorer)
34 | * [Selection tool](#selection-tool)
35 | * [Bonus functions](#bonus-functions)
36 | * [Options](#options)
37 | * [References](#references)
38 |
39 |
40 |
41 |
42 | ## Demo
43 |
44 | * [Main commands](#main-commands)
45 |
46 | 
47 |
48 | * [Selection tool](#selection-tool)
49 |
50 | 
51 |
52 | * [Pre-defined directory list](#pre-defined-directory-list)
53 |
54 | 
55 |
56 | * [Tab completion](#tab-completion)
57 |
58 | 
59 |
60 | * [Window directory list](#window-directory-list)
61 |
62 | 
63 |
64 | * [Ranking directory list](#ranking-directory-list)
65 |
66 | 
67 |
68 | * [History list (Move Back/Forward in the history)](#history-list-move-backforward-in-the-history)
69 |
70 | bd/fd commands
71 |
72 | 
73 |
74 | Use keybindings at Bash
75 |
76 | 
77 |
78 | Note: Gif shows keys of Opt in Mac, but it is same as Cmd/Alt (iTerm's setting).
79 |
80 | Use keybindings at Zsh
81 |
82 | 
83 |
84 | Note: Gif shows keys of Opt in Mac, but it is same as Cmd/Alt (iTerm's setting).
85 |
86 | * [Vim like file explorer](#vim-like-file-explorer)
87 |
88 | 
89 |
90 | ## Installation
91 |
92 | ### Get sd_cL
93 |
94 | You can get sd_cl by following methods.
95 |
96 | #### cURL
97 |
98 | You can use an install script on the web like:
99 |
100 | $ curl -fsSL https://raw.github.com/rcmdnk/sd_cl/install/install.sh| sh
101 |
102 | This will install scripts to `/usr/etc`
103 | and you may be asked root password.
104 |
105 | If you want to install other directory, do like:
106 |
107 | $ curl -fsSL https://raw.github.com/rcmdnk/sd_cl/install/install.sh| prefix=~/usr/local/ sh
108 |
109 | #### Homebrew at OS X
110 |
111 | On Mac, you can install scripts by [Homebrew](https://github.com/mxcl/homebrew):
112 |
113 | $ brew install rcmdnk/rcmdnkpac/sd_cl
114 |
115 | If you have [brew file](https://github.com/rcmdnk/homebrew-file), add following lines to Brewfile:
116 |
117 | tap 'rcmdnk/rcmdnkpac'
118 | brew 'sd_cl'
119 |
120 | then, do:
121 |
122 | $ brew file install
123 |
124 | Or if you write like:
125 |
126 | tapall 'rcmdnk/rcmdnkpac'
127 |
128 | and do `brew file install`, you will have all useful scripts in
129 | [rcmdnkpac](https://github.com/rcmdnk/homebrew-rcmdnkpac).
130 |
131 | This installs `sd_cl` to `${HOMEBREW_PREFIX}/etc` (default: `/usr/local/etc/`).
132 |
133 | #### Download
134 |
135 | Or, simply download scripts and set where you like.
136 |
137 | $ wget https://raw.githubusercontent.com/rcmdnk/sd_cl/master/etc/sd_cl
138 |
139 | or you can get it from GitHub directly.
140 |
141 | ### Set up sd_cl
142 |
143 | Get `sd_cl` and set to where you like,
144 | then, source it in your `.bashrc` or `.zshrc` like
145 |
146 | ```bash
147 | source /path/to/sd_cl
148 | ```
149 |
150 | ## Main commands
151 |
152 | ### sd (Save Directory)
153 |
154 | Commands to manage stored directories.
155 |
156 | `sd` w/o arguments saves current directory to **the last directory** (default) list.
157 |
158 | Usage: sd [-ecpwrCLh] [directory]
159 |
160 | If neither '-e' nor '-C' is specified, 'directory' (or current directory if 'directory' is not given)
161 | is stored in the list.
162 |
163 | Arguments:
164 | -e Edit directory list file
165 | -C Clear directories
166 | -H Use the directory history file (~/.config/sd_cl/history)
167 | -c Use the last directory file (~/.config/sd_cl/lastdir)
168 | -p Use the pre-defiend dirctory file (~/.config/sd_cl/predef)
169 | -L Print license and quit
170 | -h Print this HELP and quit
171 |
172 | ### cl (Change to the Last directory)
173 |
174 | Commands to change the directory to the stored one.
175 |
176 | `cl` w/o arguments change the directory to the last saved directory.
177 |
178 | Usage: cl [-lecCpwrbvLh] [-n