about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2020-12-11 17:24:33 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2020-12-11 17:27:47 +0900
commit34eae734900f42f8127c1eda5ed729f02121ae47 (patch)
treed12a7a047c7d298887e116977934c755326ecd4b
parentf493b438fd2fd695a3082f780f192e570c299247 (diff)
downloadzsh-34eae734900f42f8127c1eda5ed729f02121ae47.tar.gz
zsh-34eae734900f42f8127c1eda5ed729f02121ae47.tar.xz
zsh-34eae734900f42f8127c1eda5ed729f02121ae47.zip
47731 (+unposted): add run-help assistant for btrfs
also fix format errors in contrib.yo
-rw-r--r--ChangeLog4
-rw-r--r--Doc/Zsh/contrib.yo15
-rw-r--r--Functions/Misc/run-help-btrfs22
3 files changed, 35 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ea4b1cfab..2d524e81e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2020-12-11  Jun-ichi Takimoto  <takimoto-j@kba.biglobe.ne.jp>
 
+	* 47731 (+unposted): Functions/Misc/run-help-btrfs,
+	Doc/Zsh/contrib.yo: add run-help assistant for btrfs command.
+	(based on the patch by Samir Benmendil in 43947⁩)
+
 	* Samir Benmendil: 43946: Functions/Misc/run-help-sudo: call
 	run-help (instead of man) for the command given to sudo
 
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index 00f693664..2b567056e 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -4363,6 +4363,7 @@ directory.  These must be autoloaded, or placed as executable scripts in
 your search path, in order to be found and used by tt(run-help).
 
 startitem()
+findex(run-help-btrfs)
 findex(run-help-git)
 findex(run-help-ip)
 findex(run-help-openssl)
@@ -4370,14 +4371,16 @@ findex(run-help-p4)
 findex(run-help-sudo)
 findex(run-help-svk)
 findex(run-help-svn)
-xitem(run-help-git)
-xitem(run-help-ip)
-xitem(run-help-openssl)
-xitem(run-help-p4)
-xitem(run-help-sudo)
-xitem(run-help-svk)
+xitem(tt(run-help-btrfs))
+xitem(tt(run-help-git))
+xitem(tt(run-help-ip))
+xitem(tt(run-help-openssl))
+xitem(tt(run-help-p4))
+xitem(tt(run-help-sudo))
+xitem(tt(run-help-svk))
 item(tt(run-help-svn))(
 Assistant functions for the
+tt(btrfs),
 tt(git),
 tt(ip),
 tt(openssl),
diff --git a/Functions/Misc/run-help-btrfs b/Functions/Misc/run-help-btrfs
new file mode 100644
index 000000000..0dc1dabcb
--- /dev/null
+++ b/Functions/Misc/run-help-btrfs
@@ -0,0 +1,22 @@
+while [[ $# != 0 && $1 == -* ]]; do
+    shift
+done
+
+case $1 in
+    (b*)    man btrfs-balance          ;;
+    (c*)    man btrfs-check            ;;
+    (d*)    man btrfs-device           ;;
+    (f*)    man btrfs-filesystem       ;;
+    (i*)    man btrfs-inspect-internal ;;
+    (p*)    man btrfs-property         ;;
+    (qg*)   man btrfs-qgroup           ;;
+    (qu*)   man btrfs-quota            ;;
+    (rec*)  man btrfs-receive          ;;
+    (rep*)  man btrfs-replace          ;;
+    (resc*) man btrfs-rescue           ;;
+    (rest*) man btrfs-restore          ;;
+    (sc*)   man btrfs-scrub            ;;
+    (se*)   man btrfs-send             ;;
+    (su*)   man btrfs-subvolume        ;;
+    (*)     man btrfs                  ;;
+esac