Skip to content

Commit 44f3fb8

Browse files
iTroozdmmqzManagor
authored andcommitted
mc: add page, disambiguation and alias (#17043)
Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com> Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
1 parent 94549e2 commit 44f3fb8

File tree

6 files changed

+52
-10
lines changed

6 files changed

+52
-10
lines changed

pages/common/mc.cli.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# mc
2+
3+
> MinIO Client for object storage and filesystems.
4+
> May be named `mc` or `mcli` on some systems.
5+
> More information: <https://minio.github.io/mc/>.
6+
7+
- Add connection to a S3 server:
8+
9+
`mc alias set {{local}} {{http://localhost:9000}} {{access_key}} {{secret_key}}`
10+
11+
- Create a bucket:
12+
13+
`mc mb {{local/bucket_name}}`
14+
15+
- List buckets and their content recursively:
16+
17+
`mc ls {{local}} --recursive`

pages/common/mc.fm.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# mc
2+
3+
> Midnight Commander, a TUI file manager.
4+
> Navigate the directory structure using the `<ArrowKeys>`, the mouse or by typing the commands into the terminal.
5+
> See also: `ranger`, `clifm`, `vifm`, `nautilus`.
6+
> More information: <https://midnight-commander.org>.
7+
8+
- Start Midnight Commander:
9+
10+
`mc`
11+
12+
- Start Midnight Commander in black and white:
13+
14+
`mc {{[-b|--nocolor]}}`

pages/common/mc.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
# mc
22

3-
> Midnight Commander, a TUI file manager.
4-
> Navigate the directory structure using the `<ArrowKeys>`, the mouse or by typing the commands into the terminal.
5-
> See also: `ranger`, `clifm`, `vifm`, `nautilus`.
6-
> More information: <https://midnight-commander.org>.
3+
> `mc` can refer to multiple commands with the same name.
74
8-
- Start Midnight Commander:
5+
- View documentation for MinIO client:
96

10-
`mc`
7+
`tldr mc.cli`
118

12-
- Start Midnight Commander in black and white:
9+
- View documentation for Midnight Commander:
1310

14-
`mc {{[-b|--nocolor]}}`
11+
`tldr mc.fm`

pages/common/mcli.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# mcli
2+
3+
> This command is an alias of `mc` (MinIO client).
4+
5+
- View documentation for the original command:
6+
7+
`tldr mc.cli`

pages/common/minio-client.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# minio-client
2+
3+
> This command is an alias of `mc` (MinIO client).
4+
5+
- View documentation for the original command:
6+
7+
`tldr mc.cli`

scripts/wrong-filename.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ OUTPUT_FILE="inconsistent-filenames.txt"
1010
rm -f "$OUTPUT_FILE"
1111
touch "$OUTPUT_FILE"
1212

13-
IGNORE_LIST=("jc.json" "qm move disk" "umount" "rename" "pacman d" "pacman f" "pacman q" "pacman r" "pacman s" "pacman t" "pacman u" "parted" "print.runmailcap" "print.win")
13+
IGNORE_LIST=("jc.json" "mc.cli" "mc.fm" "qm move disk" "umount" "rename" "pacman d" "pacman f" "pacman q" "pacman r" "pacman s" "pacman t" "pacman u" "parted" "print.runmailcap" "print.win" "python m json.tool")
1414

1515
set -e
1616

1717
# Iterate through all Markdown files in the 'pages' directories
1818
find pages* -name '*.md' -type f | while read -r path; do
1919
# Extract the expected command name from the filename
20-
COMMAND_NAME_FILE=$(basename "$path" | head -c-4 | sed 's/\.fish//' | sed 's/\.js//' | sed 's/\.1//' | sed 's/\.2//' | sed 's/\.3//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]')
20+
COMMAND_NAME_FILE=$(basename "$path" | head -c-4 | sed 's/\.fish//' | sed 's/\.js//' | sed 's/\.1//' | sed 's/\.2//' | sed 's/\.3//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]')
2121

2222
# Extract the command name from the first line of the Markdown file
2323
COMMAND_NAME_PAGE=$(head -n1 "$path" | tail -c+3 | sed 's/--//' | tr '-' ' ' | tr '[:upper:]' '[:lower:]')

0 commit comments

Comments
 (0)