aboutsummaryrefslogtreecommitdiffstats
path: root/texinfo
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-06-25 12:56:30 +0200
committerMattias Andrée <maandree@kth.se>2021-06-25 12:56:30 +0200
commit5a7db2f34aa6a6787d98a001b6d28be97f36abf4 (patch)
tree52db199005cc5daee35b5c0e9b3d28b534449e1c /texinfo
downloaddotfiles-5a7db2f34aa6a6787d98a001b6d28be97f36abf4.tar.gz
dotfiles-5a7db2f34aa6a6787d98a001b6d28be97f36abf4.tar.bz2
dotfiles-5a7db2f34aa6a6787d98a001b6d28be97f36abf4.tar.xz
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-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
+}