Browse code

Add `webman`

Robert Cranston authored on 24/11/2025 22:10:51
Showing 1 changed files
... ...
@@ -39,3 +39,32 @@ webvulkan()
39 39
 {
40 40
   websearch "https://docs.vulkan.org/refpages/" "$@"
41 41
 }
42
+
43
+# TODO: The `man -` makes this require two ^Z presses to background.
44
+webman()
45
+(
46
+  # See also <https://wiki.archlinux.org/title/Man_page#Online_man_pages>.
47
+  # websearch "https://man7.org/linux/man-pages/" "$1${sect+.$sect}"
48
+  # xdg-open "https://man.archlinux.org/search?go=Go&q=$1${sect+.$sect}"
49
+  # xdg-open "https://manpages.debian.org/$1${sect+.$sect}"
50
+  # xdg-open "https://man.cx/$1${sect+($sect)}"
51
+  # xdg-open "https://man.he.net/?section=${sect-all}&topic=$1"
52
+
53
+  # See <https://man.archlinux.org/#USAGE>.
54
+  # curl -sfL "https://man.archlinux.org/man/$1.raw" | man -l -
55
+  # curl -sfL "https://man.archlinux.org/man/$1.txt" | less
56
+
57
+  # See <https://manpages.debian.org/>.
58
+  # curl -sfL "https://manpages.debian.org/$1.gz" | man -l -
59
+
60
+  [ "$2" ] && sect="$1" && shift || true
61
+  for url in \
62
+    "https://man.archlinux.org/man/$1${sect+.$sect}.raw" \
63
+    "https://manpages.debian.org/$1${sect+.$sect}.gz"
64
+  do
65
+    page="$(curl -sfL "$url")"
66
+    [ "$page" ] || continue
67
+    printf '%s\n' "$page" | man -l -
68
+    break
69
+  done
70
+)
Browse code

Add `webopengl`, `webvulkan`

Robert Cranston authored on 24/11/2025 22:10:33
Showing 1 changed files
... ...
@@ -29,3 +29,13 @@ webwin32()
29 29
   # websearch "https://learn.microsoft.com/en-us/windows/win32/api/" "$@"
30 30
   websearch "https://learn.microsoft.com/en-us/windows/" "win32/api" "$@"
31 31
 }
32
+
33
+webopengl()
34
+{
35
+  websearch "https://registry.khronos.org/OpenGL-Refpages/" "$@"
36
+}
37
+
38
+webvulkan()
39
+{
40
+  websearch "https://docs.vulkan.org/refpages/" "$@"
41
+}
Browse code

Add `webwin32`

Robert Cranston authored on 24/11/2025 22:10:22
Showing 1 changed files
... ...
@@ -23,3 +23,9 @@ webc()
23 23
 {
24 24
   websearch "https://cppreference.com/w/c/" "$@"
25 25
 }
26
+
27
+webwin32()
28
+{
29
+  # websearch "https://learn.microsoft.com/en-us/windows/win32/api/" "$@"
30
+  websearch "https://learn.microsoft.com/en-us/windows/" "win32/api" "$@"
31
+}
Browse code

Add `webcpp`, `webc`

Robert Cranston authored on 24/11/2025 22:09:49
Showing 1 changed files
... ...
@@ -13,3 +13,13 @@ webubuntu()
13 13
 {
14 14
   xdg-open "https://packages.ubuntu.com/search?searchon=names&section=all&keywords=$*"
15 15
 }
16
+
17
+webcpp()
18
+{
19
+  websearch "https://cppreference.com/w/cpp/" "$@"
20
+}
21
+
22
+webc()
23
+{
24
+  websearch "https://cppreference.com/w/c/" "$@"
25
+}
Browse code

Add `webdebian`, `webubuntu`

Robert Cranston authored on 24/11/2025 22:09:18
Showing 1 changed files
... ...
@@ -3,3 +3,13 @@ websearch()
3 3
   # See <https://duckduckgo.com/bangs>.
4 4
   xdg-open "https://duckduckgo.com/lite/?q=!ducky ${2+site:}$*"
5 5
 }
6
+
7
+webdebian()
8
+{
9
+  xdg-open "https://packages.debian.org/search?searchon=names&section=all&keywords=$*"
10
+}
11
+
12
+webubuntu()
13
+{
14
+  xdg-open "https://packages.ubuntu.com/search?searchon=names&section=all&keywords=$*"
15
+}
Browse code

Add `websearch`

Robert Cranston authored on 24/11/2025 22:08:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,5 @@
1
+websearch()
2
+{
3
+  # See <https://duckduckgo.com/bangs>.
4
+  xdg-open "https://duckduckgo.com/lite/?q=!ducky ${2+site:}$*"
5
+}