aboutsummaryrefslogtreecommitdiffstats
path: root/texinfo
diff options
context:
space:
mode:
Diffstat (limited to 'texinfo')
-rw-r--r--texinfo/Makefile16
-rw-r--r--texinfo/bash-aliases30
2 files changed, 46 insertions, 0 deletions
diff --git a/texinfo/Makefile b/texinfo/Makefile
new file mode 100644
index 0000000..0cc5a60
--- /dev/null
+++ b/texinfo/Makefile
@@ -0,0 +1,16 @@
+.POSIX:
+
+install:
+ if test -x /usr/bin/info; then \
+ mkdir -p -- ~/.config/bash/aliases.d && \
+ test ! -d ~/.config/bash/aliases.d/texinfo && \
+ ln -sf -- ~/.dotfiles/texinfo/bash-aliases ~/.config/bash/aliases.d/texinfo; \
+ else \
+ make uninstall; \
+ fi
+
+uninstall:
+ -unlink -- ~/.config/bash/aliases.d/texinfo
+ -rmdir -- ~/.config/bash/aliases.d
+
+.PHONY: install uninstall
diff --git a/texinfo/bash-aliases b/texinfo/bash-aliases
new file mode 100644
index 0000000..b52e4e8
--- /dev/null
+++ b/texinfo/bash-aliases
@@ -0,0 +1,30 @@
+# -*- shell-script -*-
+
+#DESCRIPTION: Open a programs info manual and open the invoking chapter
+#USAGE: iv [program]
+
+iv () {
+ __texinfo="$1"
+ shift 1
+ info "(${__texinfo})" invoking "$@"
+ unset __texinfo
+}
+
+
+#DESCRIPTION: Open a programs info manual and try to select a usage page
+#USAGE: iu [program] [node]
+
+iu () {
+ info --usage "$@"
+}
+
+
+#DESCRIPTION: Open a programs info manual
+#USAGE: i [program] [node]
+
+i () {
+ __texinfo="$1"
+ shift 1
+ info "(${__texinfo})" "$@"
+ unset __texinfo
+}