docs(functions): add man-page headers to branch, fc, gitup, sudo-toggle
These four were the only documented functions with no comment header, carrying just a one-line description. Content is merged from their manual entries plus what the implementations actually do (fc's vi fallback and empty-buffer abort, sudo-toggle's credential-cache clear), so the headers are a superset of Section 5 rather than a copy of it.
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
# Copyright (C) 2026 Rootiest
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
# CATEGORY
|
||||
# 07-system-and-monitoring
|
||||
#
|
||||
# SYNOPSIS
|
||||
# sudo-toggle
|
||||
#
|
||||
# DESCRIPTION
|
||||
# Toggles the sudo NOPASSWD rule on and off via
|
||||
# /etc/sudoers.d/nofail-toggle. Useful for automated tasks that would
|
||||
# otherwise require a password entry. Clears the sudo credential cache
|
||||
# when re-enabling, so the lockdown takes effect immediately.
|
||||
#
|
||||
# RETURNS
|
||||
# 0 Rule toggled
|
||||
#
|
||||
# EXAMPLE
|
||||
# sudo-toggle
|
||||
function sudo-toggle --description 'Toggle sudo password requirement on/off'
|
||||
# Check the file size using sudo stat to see if our bypass rule is active
|
||||
set -l file_size (sudo stat -c %s /etc/sudoers.d/nofail-toggle 2>/dev/null)
|
||||
|
||||
Reference in New Issue
Block a user