forked from uw-psych/hyakvnc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,648 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# ## COMMAND: config | ||
|
||
# help_config() | ||
function help_config { | ||
cat <<EOF | ||
Show the current configuration for hyakvnc | ||
Usage: hyakvnc config [config options...] | ||
Description: | ||
Show the current configuration for hyakvnc, as set in the user configuration file at ${HYAKVNC_CONFIG_FILE}, in the current environment, or the default values set by hyakvnc. | ||
Options: | ||
-h, --help Show this help message and exit | ||
Examples: | ||
# Show configuration | ||
hyakvnc config | ||
EOF | ||
} | ||
|
||
# cmd_config() | ||
function cmd_config { | ||
# Parse arguments: | ||
while true; do | ||
case "${1:-}" in | ||
-h | --help) | ||
help_config | ||
return 0 | ||
;; | ||
-*) | ||
help log ERROR "Unknown option for config: ${1:-}\n" | ||
return 1 | ||
;; | ||
*) | ||
break | ||
;; | ||
esac | ||
done | ||
export -p | sed -E 's/^declare\s+-x\s+//; /^HYAKVNC_/!d' | ||
return 0 | ||
} | ||
|
Oops, something went wrong.