diff --git a/contributing-guides/style-guide.md b/contributing-guides/style-guide.md index a7b92f0ba..fad3719d0 100644 --- a/contributing-guides/style-guide.md +++ b/contributing-guides/style-guide.md @@ -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/}}`. +3. Use `{{filename}}` rather than `{{file_name}}`. +4. For any reference to paths to files or directories, use the format `{{path/to/}}`. 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/}}` convention for all path-related commands, except when the +5. Follow the `{{path/to/}}` 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 diff --git a/pages/common/figlet.md b/pages/common/figlet.md index 50d39f07c..fb2ab033a 100644 --- a/pages/common/figlet.md +++ b/pages/common/figlet.md @@ -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: diff --git a/pages/common/git-checkout.md b/pages/common/git-checkout.md index 70cd423bb..ec4417032 100644 --- a/pages/common/git-checkout.md +++ b/pages/common/git-checkout.md @@ -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}}` diff --git a/pages/common/ignite.md b/pages/common/ignite.md index aa7e34e88..722d836bd 100644 --- a/pages/common/ignite.md +++ b/pages/common/ignite.md @@ -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: diff --git a/pages/common/odps-resource.md b/pages/common/odps-resource.md index 7101737b0..71dbad681 100644 --- a/pages/common/odps-resource.md +++ b/pages/common/odps-resource.md @@ -8,7 +8,7 @@ - Add file resource: -`add file {{file_name}} as {{alias}};` +`add file {{filename}} as {{alias}};` - Add archive resource: diff --git a/pages/common/p4.md b/pages/common/p4.md index f1e66b861..f9c405591 100644 --- a/pages/common/p4.md +++ b/pages/common/p4.md @@ -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: diff --git a/pages/common/sc-im.md b/pages/common/sc-im.md index ea1635747..1d90854a2 100644 --- a/pages/common/sc-im.md +++ b/pages/common/sc-im.md @@ -6,7 +6,7 @@ - Start SC-IM: -`scim {{file_name}}.csv` +`scim {{filename}}.csv` - Enter a string into the current cell: diff --git a/pages/common/terminalizer.md b/pages/common/terminalizer.md index a7fe582a0..b087cade2 100644 --- a/pages/common/terminalizer.md +++ b/pages/common/terminalizer.md @@ -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}}` diff --git a/pages/common/trash-cli.md b/pages/common/trash-cli.md index 0dffa42b7..a767a76a6 100644 --- a/pages/common/trash-cli.md +++ b/pages/common/trash-cli.md @@ -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}}` diff --git a/pages/linux/dpkg.md b/pages/linux/dpkg.md index c0821a6b5..3263dd2ea 100644 --- a/pages/linux/dpkg.md +++ b/pages/linux/dpkg.md @@ -24,4 +24,4 @@ - Find out which package owns a file: -`dpkg -S {{file_name}}` +`dpkg -S {{filename}}` diff --git a/pages/linux/toilet.md b/pages/linux/toilet.md index 39b170783..6f49a9d8c 100644 --- a/pages/linux/toilet.md +++ b/pages/linux/toilet.md @@ -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: diff --git a/pages/linux/tshark.md b/pages/linux/tshark.md index 0a38b2559..26ccdc93c 100644 --- a/pages/linux/tshark.md +++ b/pages/linux/tshark.md @@ -32,4 +32,4 @@ - Analyze packets from a file: -`tshark -r {{file_name}}.pcap` +`tshark -r {{filename}}.pcap` diff --git a/pages/linux/uvcdynctrl.md b/pages/linux/uvcdynctrl.md index a49ea7d99..b1c70d014 100644 --- a/pages/linux/uvcdynctrl.md +++ b/pages/linux/uvcdynctrl.md @@ -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}}` diff --git a/pages/osx/mkfile.md b/pages/osx/mkfile.md index 7b3614098..47668d942 100644 --- a/pages/osx/mkfile.md +++ b/pages/osx/mkfile.md @@ -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}}`