| ... | ... |
@@ -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 |
+) |
| ... | ... |
@@ -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 |
+} |
| ... | ... |
@@ -13,3 +13,13 @@ webubuntu() |
| 13 | 13 |
{
|
| 14 | 14 |
xdg-open "https://packages.ubuntu.com/search?searchon=names§ion=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 |
+} |
| ... | ... |
@@ -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§ion=all&keywords=$*" |
|
| 10 |
+} |
|
| 11 |
+ |
|
| 12 |
+webubuntu() |
|
| 13 |
+{
|
|
| 14 |
+ xdg-open "https://packages.ubuntu.com/search?searchon=names§ion=all&keywords=$*" |
|
| 15 |
+} |