kcd !VERSION! User Guide | ||
---|---|---|
<<< Previous | Next >>> |
kcd works by consulting the directory tree file for the list of directories available. By default the file is named ~/.kcd.save.kcd.gz but may change according to the kcd configuration file. This file is automatically created when kcd is run for the first time.
When you type the command
kcd |
If you know the name of directory you want to change to, for example, /usr/include, you can type
kcd include |
kcd incl |
If kcd found from that there are more than 4 directories contain the text include or incl (for the second example), it will list all matched directories. You can again use arrow keys, Page up, Page down, etc. to move the highlight bar to /usr/include and press Enter.
If there are less than or equal 4 matched directory, kcd will pick a directory and jump. Repeat the same kcd command, in this case kcd include or kcd incl, will go to the next matched one, and so on. You can use shell's command history for this purpose. For example, in several shells, pressing Up arrow key and Enter will repeat the previous command. You may change the number of matched directory threshold to any value other than 4 by modifying configuration file. See the `Configuration File' section below.
On the other hand, if kcd cannot find the requested directory, fuzzy finding mode is used. In fuzzy mode, directories that approximately matches the given text is listed. By default, fuzzy mode will find 10 closest matches. This too can be changed by the configuration file.
You may create bookmarks via option -ba to help locate frequently accessed directories. When kcd searches for directories matching a given text and finds that at least one is bookmarked, then all non-bookmarked directories are ignored. So bookmarked directories are always chosen over non-bookmarked ones. You can override this behavior by supplying kcd with -B option before the text such as
kcd -B incl |
You can also list all bookmarked directory using -b option.
While in full screen mode, besides using arrow keys, etc. to move the highlight bar, you may type the some text string to limit the highlight bar to move between items containing the string. The text string is shown at the bottom of the screen inside [...]. To restore highlight bar behavior, press Tab key.
The list of directories used in all operations above is taken from ~/.kcd.save.gz. You may want to update it when directories are added or removed. To update the file, type
kcd -r |
kcd -rf |
<<< Previous | Home | Next >>> |
What is kcd? | Directory Tree Window |