]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/fastfile/README.md
...
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / fastfile / README.md
1 # Fastfile plugin
2
3 This plugin adds a way to reference certain files or folders used frequently using
4 a global alias or shortcut.
5
6 To use it, add `fastfile` to the plugins array in your zshrc file:
7
8 ```zsh
9 plugins=(... fastfile)
10 ```
11
12 ## Usage
13
14 Example: you access folder `/code/project/backend/database` very frequently.
15
16 First, generate a shortcut with the name `pjdb`:
17
18 ```zsh
19 $ fastfile pjdb /code/project/backend/database
20 ```
21
22 Next time you want to access it, use `§pjdb`. For example:
23
24 ```zsh
25 $ cd §pjdb
26 $ subl §pjdb
27 ```
28
29 where § is the fastfile prefix (see [below](#options) for how to change).
30
31 **Note:** shortcuts with spaces in the name are assigned a global alias
32 where the spaces have been substituted with underscores (`_`). For example:
33 a shortcut named `"hello world"` corresponds with `§hello_world`.
34
35 ## Functions
36
37 - `fastfile <shortcut_name> [path/to/file/or/folder]`: generate a shortcut.
38   If the second argument is not provided, the current directory is used.
39
40 - `fastfile_print <shortcut_name>`: prints a shortcut, with the format
41   `<prefix><shortcut_name> -> <shortcut_path>`.
42
43 - `fastfile_ls`: lists all shortcuts.
44
45 - `fastfile_rm <shortcut_name>`: remove a shortcut.
46
47 - `fastfile_sync`: generates the global aliases for the shortcuts.
48
49 ### Internal functions
50
51 - `fastfile_resolv <shortcut_name>`: resolves the location of the shortcut
52   file, i.e., the file in the fastfile directory where the shortcut path
53   is stored.
54
55 - `fastfile_get <shortcut_name>`: get the real path of the shortcut.
56
57 ## Aliases
58
59 | Alias  | Function         |
60 |--------|------------------|
61 | ff     | `fastfile`       |
62 | ffp    | `fastfile_print` |
63 | ffrm   | `fastfile_rm`    |
64 | ffls   | `fastfile_ls`    |
65 | ffsync | `fastfile_sync`  |
66
67 ## Options
68
69 These are options you can set to change certain parts of the plugin. To change
70 them, add `<variable>=<value>` to your zshrc file, before Oh My Zsh is sourced.
71 For example: `fastfile_var_prefix='@'`.
72
73 - `fastfile_var_prefix`: prefix for the global aliases created. Controls the prefix of the
74   created global aliases.  
75   **Default:** `§` (section sign), easy to type in a german keyboard via the combination
76   [`⇧ Shift`+`3`](https://en.wikipedia.org/wiki/German_keyboard_layout#/media/File:KB_Germany.svg),
77   or using `⌥ Option`+`6` in macOS.
78
79 - `fastfile_dir`: directory where the fastfile shortcuts are stored. Needs to end
80   with a trailing slash.  
81   **Default:** `$HOME/.fastfile/`.
82
83 ## Author
84
85 - [Karolin Varner](https://github.com/koraa)