mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
Change all occurrences of file_name to filename (#4059)
This commit is contained in:
parent
ff6e9c4694
commit
4e1662b729
14 changed files with 26 additions and 25 deletions
|
@ -50,18 +50,19 @@ Keep the following guidelines in mind when choosing tokens:
|
|||
1. Use short but descriptive tokens,
|
||||
ex. `{{source_file}}` or `{{wallet.txt}}`.
|
||||
2. Use [`snake_case`](https://en.wikipedia.org/wiki/Snake_case) for multi-word tokens.
|
||||
3. For any reference to paths to files or directories, use the format `{{path/to/<placeholder>}}`.
|
||||
3. Use `{{filename}}` rather than `{{file_name}}`.
|
||||
4. For any reference to paths to files or directories, use the format `{{path/to/<placeholder>}}`.
|
||||
For example, `ln -s {{path/to/file}} {{path/to/symlink}}`.
|
||||
In case of a possible reference both to a file or a directory, use `{{path/to/file_or_directory}}`
|
||||
4. Follow the `{{path/to/<placeholder>}}` convention for all path-related commands, except when the
|
||||
5. Follow the `{{path/to/<placeholder>}}` convention for all path-related commands, except when the
|
||||
file location is implicit.
|
||||
5. If a command expects the file to have a particular extension, use it.
|
||||
6. If a command expects the file to have a particular extension, use it.
|
||||
For example, `unrar x {{compressed.rar}}`.
|
||||
In case a generic extension is needed, use `{{.ext}}`, but **only** if an extension is required.
|
||||
For instance, in find.md's example "Find files by extension" (`find {{root_path}} -name '{{*.ext}}'`)
|
||||
using `{{*.ext}}` explains the command without being unnecessarily specific;
|
||||
But in a command like `wc -l {{file}}`, using `{{file}}` (without extension) is sufficient.
|
||||
6. If the example is clearer with an actual value rather than a generic placeholder, use the actual value.
|
||||
7. If the example is clearer with an actual value rather than a generic placeholder, use the actual value.
|
||||
For example, use `iostat {{2}}` rather than `iostat {{interval_in_secs}}`.
|
||||
|
||||
In general, tokens should make it as intuitive as possible
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
- Use a custom font file:
|
||||
|
||||
`figlet {{input_text}} -f {{font_file_name}}`
|
||||
`figlet {{input_text}} -f {{font_filename}}`
|
||||
|
||||
- Pipe command output through figlet:
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
|
||||
- Discard unstaged changes to a given file:
|
||||
|
||||
`git checkout {{file_name}}`
|
||||
`git checkout {{filename}}`
|
||||
|
||||
- Replace a file in the current directory with the version of it committed in a given branch:
|
||||
|
||||
`git checkout {{branch_name}} -- {{file_name}}`
|
||||
`git checkout {{branch_name}} -- {{filename}}`
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
- Generate file from a plugin:
|
||||
|
||||
`ignite generate {{plugin_name}} {{file_name}}`
|
||||
`ignite generate {{plugin_name}} {{filename}}`
|
||||
|
||||
- Add an Ignite plugin to the project:
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
- Add file resource:
|
||||
|
||||
`add file {{file_name}} as {{alias}};`
|
||||
`add file {{filename}} as {{alias}};`
|
||||
|
||||
- Add archive resource:
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
- Open a file to edit:
|
||||
|
||||
`p4 edit -c {{changelist_number}} {{file_name}}`
|
||||
`p4 edit -c {{changelist_number}} {{filename}}`
|
||||
|
||||
- Open a new file to add it to the depot:
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
- Start SC-IM:
|
||||
|
||||
`scim {{file_name}}.csv`
|
||||
`scim {{filename}}.csv`
|
||||
|
||||
- Enter a string into the current cell:
|
||||
|
||||
|
|
|
@ -9,16 +9,16 @@
|
|||
|
||||
- Record the terminal and create a recording file:
|
||||
|
||||
`terminalizer record {{file_name}}`
|
||||
`terminalizer record {{filename}}`
|
||||
|
||||
- Play a recorded file on the terminal:
|
||||
|
||||
`terminalizer play {{file_name}}`
|
||||
`terminalizer play {{filename}}`
|
||||
|
||||
- Render a recording file as an animated gif image:
|
||||
|
||||
`terminalizer render {{file_name}}`
|
||||
`terminalizer render {{filename}}`
|
||||
|
||||
- Upload a video to terminalizer.com:
|
||||
|
||||
`terminalizer share {{file_name}}`
|
||||
`terminalizer share {{filename}}`
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
- Trash files and directories:
|
||||
|
||||
`trash-put {{file_name}}`
|
||||
`trash-put {{filename}}`
|
||||
|
||||
- Empty the trashcan:
|
||||
|
||||
|
@ -21,4 +21,4 @@
|
|||
|
||||
- Remove individual files from the trashcan:
|
||||
|
||||
`trash-rm {{file_name}}`
|
||||
`trash-rm {{filename}}`
|
||||
|
|
|
@ -24,4 +24,4 @@
|
|||
|
||||
- Find out which package owns a file:
|
||||
|
||||
`dpkg -S {{file_name}}`
|
||||
`dpkg -S {{filename}}`
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
- Generate ASCII art using a custom font file:
|
||||
|
||||
`toilet {{input_text}} -f {{font_file_name}}`
|
||||
`toilet {{input_text}} -f {{font_filename}}`
|
||||
|
||||
- Generate ASCII art using a filter:
|
||||
|
||||
|
|
|
@ -32,4 +32,4 @@
|
|||
|
||||
- Analyze packets from a file:
|
||||
|
||||
`tshark -r {{file_name}}.pcap`
|
||||
`tshark -r {{filename}}.pcap`
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
- Save the state of the current controls to a file:
|
||||
|
||||
`uvcdynctrl -W {{file_name}}`
|
||||
`uvcdynctrl -W {{filename}}`
|
||||
|
||||
- Load the state of the controls from a file:
|
||||
|
||||
`uvcdynctrl -L {{file_name}}`
|
||||
`uvcdynctrl -L {{filename}}`
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
- Create an empty file of 15 kilobytes:
|
||||
|
||||
`mkfile -n {{15k}} {{file_name}}`
|
||||
`mkfile -n {{15k}} {{filename}}`
|
||||
|
||||
- Create a file of a given size and unit (bytes, KB, MB, GB):
|
||||
|
||||
`mkfile -n {{size}}{{b|k|m|g}} {{file_name}}`
|
||||
`mkfile -n {{size}}{{b|k|m|g}} {{filename}}`
|
||||
|
||||
- Create two files of 4 megabytes each:
|
||||
|
||||
`mkfile -n {{4m}} {{first_file_name}} {{second_file_name}}`
|
||||
`mkfile -n {{4m}} {{first_filename}} {{second_filename}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue