diff --git a/docs/fish-config.1 b/docs/fish-config.1 index 133d5f2..a601851 100644 --- a/docs/fish-config.1 +++ b/docs/fish-config.1 @@ -1695,6 +1695,75 @@ config-help pkg --man Also available as: help config [SECTION] [FLAGS] \f[R] .fi +.SS open-url +.IP +.nf +\f[C] +Synopsis: open-url [-s|--silent] [-v|--verbose] + open-url -h | --help + +Opens a URL or file:// URI in the best available graphical web browser, +backgrounded so it never blocks the terminal. Resolves a real browser +binary rather than deferring to xdg-open, whose MIME dispatch can hand +local text/html files to non-browser apps (e.g. ebook readers). + +Silent by default: prints nothing on success (errors always go to +stderr). Pass --verbose / -v to report which browser is launched; +--silent / -s is accepted for explicitness. + +Resolution order: + 1. $fish_help_browser (explicit override) + 2. $BROWSER (validated; errors if not a command) + 3. xdg-mime default handler for x-scheme-handler/https + 4. First known browser binary found in a built-in list + 5. xdg-open (last resort) + +open-url https://git.rootiest.dev/rootiest/fish-config +open-url \[dq]file://$HOME/.config/fish/docs/html/index.html\[dq] + +Used internally by config-help --html. + +Typo abbreviation: url-open (expands to open-url on space/enter). +\f[R] +.fi +.SS repo-open +.IP +.nf +\f[C] +Synopsis: repo-open [-p|--print] [-r|--root] + repo-open -h | --help + +Opens the web page for the current repository\[aq]s \[ga]origin\[ga] remote in a +browser (via open-url). Deep-links to the current branch when it exists +on the remote \[em] falling back to the remote\[aq]s default branch (main/master) +otherwise \[em] and to the current sub-directory when run below the repo root. + +The remote URL is normalized from HTTPS and SSH/scp forms +(git\[at]host:owner/repo.git, ssh://\&..., https://\&...). The web path layout is +provider-specific; the provider is resolved in order: + + 1. git config browse.provider (per-repo or --global override) + 2. Hostname heuristic (github / gitlab / gitea / bitbucket; + codeberg → gitea) + 3. Default: github-style layout + +Self-hosted hosts the heuristic can\[aq]t classify (a Gitea/GitLab instance +on a custom domain) need a one-time override: + + git config browse.provider gitea + +Flags: + --print / -p Print the resolved URL instead of opening it. + --root / -r Ignore the current sub-directory; link to the repo root. + --help / -h Show usage. + +repo-open +repo-open --print +repo-open --root + +Typo abbreviation: open-repo (expands to repo-open on space/enter). +\f[R] +.fi .SS config-update .IP .nf diff --git a/docs/html/9-5-functions-reference.html b/docs/html/9-5-functions-reference.html index 68f0dcb..20704e8 100644 --- a/docs/html/9-5-functions-reference.html +++ b/docs/html/9-5-functions-reference.html @@ -1138,7 +1138,66 @@ config-help --man config-help pkg --man Also available as: help config [SECTION] [FLAGS] -

config-update

+

open-url

+
Synopsis:  open-url [-s|--silent] [-v|--verbose] <url>
+           open-url -h | --help
+
+Opens a URL or file:// URI in the best available graphical web browser,
+backgrounded so it never blocks the terminal. Resolves a real browser
+binary rather than deferring to xdg-open, whose MIME dispatch can hand
+local text/html files to non-browser apps (e.g. ebook readers).
+
+Silent by default: prints nothing on success (errors always go to
+stderr). Pass --verbose / -v to report which browser is launched;
+--silent / -s is accepted for explicitness.
+
+Resolution order:
+  1. $fish_help_browser  (explicit override)
+  2. $BROWSER            (validated; errors if not a command)
+  3. xdg-mime default handler for x-scheme-handler/https
+  4. First known browser binary found in a built-in list
+  5. xdg-open            (last resort)
+
+open-url https://git.rootiest.dev/rootiest/fish-config
+open-url "file://$HOME/.config/fish/docs/html/index.html"
+
+Used internally by config-help --html.
+
+Typo abbreviation: url-open (expands to open-url on space/enter).
+

repo-open

+
Synopsis:  repo-open [-p|--print] [-r|--root]
+           repo-open -h | --help
+
+Opens the web page for the current repository's `origin` remote in a
+browser (via open-url). Deep-links to the current branch when it exists
+on the remote — falling back to the remote's default branch (main/master)
+otherwise — and to the current sub-directory when run below the repo root.
+
+The remote URL is normalized from HTTPS and SSH/scp forms
+(git@host:owner/repo.git, ssh://…, https://…). The web path layout is
+provider-specific; the provider is resolved in order:
+
+  1. git config browse.provider   (per-repo or --global override)
+  2. Hostname heuristic           (github / gitlab / gitea / bitbucket;
+                                    codeberg → gitea)
+  3. Default: github-style layout
+
+Self-hosted hosts the heuristic can't classify (a Gitea/GitLab instance
+on a custom domain) need a one-time override:
+
+  git config browse.provider gitea
+
+Flags:
+  --print / -p   Print the resolved URL instead of opening it.
+  --root  / -r   Ignore the current sub-directory; link to the repo root.
+  --help  / -h   Show usage.
+
+repo-open
+repo-open --print
+repo-open --root
+
+Typo abbreviation: open-repo (expands to repo-open on space/enter).
+

config-update

Synopsis:  config-update [-h] [-n] [-f]
 
 Pulls the latest fish configuration from the upstream repository
@@ -1156,7 +1215,7 @@ Flags:
 config-update
 config-update --dry-run
 config-update --force
-

config-settings

+

config-settings

Synopsis:  config-settings [-h]
 
 Opens an interactive TUI for managing fish configuration settings across
@@ -1209,50 +1268,50 @@ Flags:
   --help / -h   Show usage.
 
 config-settings
-

config-toggle +

config-toggle (deprecated)

Deprecated alias for config-settings. Prints a deprecation notice to
 stderr, then delegates all arguments to config-settings.
 
 config-toggle
-

bash

+

bash

Synopsis:  bash [args...]
 Switches to bash, with XDG config applied. On exit, $SHELL is reset
 back to fish.
-

bd-pull

+

bd-pull

Synopsis:  bd-pull <owner/repo>
 Fetches unlinked Gitea issues and creates local Beads entries, updating
 issue titles with the assigned Beads IDs.
 Requires $GITEA_TOKEN and $GITEA_URL to be set.
 
 bd-pull rootiest/fish-config
-

cheat

+

cheat

Synopsis:  cheat <topic> [args...]
 Displays a colorized cheatsheet using cheat -c, falls back to tldr,
 then man.
 
 cheat tar
 cheat git
-

cffetch / ffetch

+

cffetch / ffetch

Synopsis:  cffetch [args...]  /  ffetch [args...]
 Clears the screen and displays system information via fastfetch with
 the custom config at ~/.fastfetch.jsonc. Falls back to neofetch.
-

dockup

+

dockup

Synopsis:  dockup [-h] [directory]
 Pulls latest Docker images, restarts services in the given Docker
 Compose project, and prunes dangling images.
 
 dockup ~/myapp
-

joplin

+

joplin

Synopsis:  joplin [args...]
 Runs the Joplin CLI with Node.js deprecation warnings suppressed.
 
 joplin ls
-

ld

+

ld

Synopsis:  ld
 Launches lazydocker targeting the currently active Docker context,
 detected via docker context inspect.
-

replay

+

replay

Synopsis:  replay <commands>
 Runs Bash commands and replays any resulting changes to environment
 variables, aliases, and the working directory back into the current
@@ -1260,7 +1319,7 @@ Fish session. Useful for sourcing Bash scripts.
 
 replay "source ~/.bashrc"
 replay "export FOO=bar"
-

kitty-logging

+

kitty-logging

Synopsis:  kitty-logging [install|uninstall|status|dismiss] [-h]
 
 Manages the Kitty scrollback watcher that powers C5 logging. Ships a
@@ -1281,11 +1340,11 @@ uninstalling. Install affects new Kitty windows only.
 Example:
   kitty-logging install
   kitty-logging status
-

tmux-clean

+

tmux-clean

Synopsis:  tmux-clean
 Kills all detached (unattached) tmux sessions, leaving attached ones
 running.
-

wake-lock

+

wake-lock

Synopsis:  wake-lock <command> [args...]
 Runs a command under systemd-inhibit, preventing the system from going
 idle or sleeping until the command completes.
diff --git a/docs/html/index.html b/docs/html/index.html
index 3fbb297..2ccf262 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -769,6 +769,10 @@ id="toc-514-miscellaneous">5.14 Miscellaneous