Skip to content

Commit

Permalink
scripts: make option listing more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
rnpnr committed Jan 6, 2025
1 parent 824a7d1 commit d5db964
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
9 changes: 6 additions & 3 deletions vis-clipboard
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ vc_usage() {
Copy/paste clipboard interface with support on all provided platforms.
Available selections: clipboard, primary
Example: $(basename "$0") --copy --selection primary"
Options:
--copy copy text from standard input
--paste paste text to standard output
--usable silently exit with a status code indicating if a supported
clipboard implementation was found
--selection take input from sel. valid options: clipboard, primary"
}

vc_determine_command() {
Expand Down
9 changes: 4 additions & 5 deletions vis-complete
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ usage() {
Interactively complete file or word
--file this passes pattern to obtain a list of matching
file names (this is the default).
--word this reads standard input to obtain a list of lines
matching pattern.
pattern pattern to be completed"
Options:
--file expand pattern into a list of matching file names (default)
--word apply pattern to a list of words from standard input
pattern pattern to be completed"
}

basic_regex_quote() { printf "%s" "$1" | sed 's|[\\.*^$[]|\\&|g'; }
Expand Down
7 changes: 4 additions & 3 deletions vis-open
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ usage() {
Interactively select a file to open
-f always present the given arguments, even when there is only one
-p prompt
file-pattern list of filenames and directories"
Options:
-f always present given arguments, even when there is only one
-p use prompt as prompt string
file-pattern list of filenames and directories"
}

# print a list of filenames on stdin and distinguish directories
Expand Down

0 comments on commit d5db964

Please sign in to comment.