From 299963fae31995e403440d280c74e560ff93734b Mon Sep 17 00:00:00 2001 From: Robin Neatherway Date: Mon, 8 Apr 2024 22:15:27 +0100 Subject: [PATCH] Update README to include --details flag --- README.md | 66 ++++++++++++++++++++++------------------ cmd/gh-slack/cmd/read.go | 2 +- cmd/gh-slack/cmd/root.go | 2 +- 3 files changed, 38 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index e8bc2c9..ef9d307 100644 --- a/README.md +++ b/README.md @@ -14,36 +14,42 @@ This project provides a means of archiving a Slack conversation or thread as mar ## Usage - Usage: - gh slack [command] - - If no command is specified, the default is "read". The default command also requires a permalink argument for the first message to fetch. - Use "gh slack read --help" for more information about the default command behaviour. - - Examples: - gh slack -i # defaults to read command - gh slack read - gh slack read -i - gh slack send -m -c -t - - # Example configuration (add to gh's configuration file at $HOME/.config/gh/config.yml): - extensions: - slack: - team: github - channel: ops - bot: hubot # Can be a user id (most reliable), bot profile name or username - - Available Commands: - completion Generate the autocompletion script for the specified shell - help Help about any command - read Reads a Slack channel and outputs the messages as markdown - send Sends a message to a Slack channel - - Flags: - -h, --help help for gh-slack - -v, --verbose Show verbose debug information - - Use "gh slack [command] --help" for more information about a command. +``` +Usage: + gh-slack [command] + + If no command is specified, the default is "read". The default command also requires a permalink argument for the first message to fetch. + Use "gh-slack read --help" for more information about the default command behaviour. + +Examples: + gh-slack --details --issue # defaults to read command + gh-slack read + gh-slack read -i + gh-slack send -m -c -t + gh-slack api post chat.postMessage -b '{"channel":"123","blocks":[...]} + eval $(gh-slack auth -t ) + + # Example configuration (add to gh's configuration file at $HOME/.config/gh/config.yml): + extensions: + slack: + team: foo + channel: ops + bot: robot # Can be a user id (most reliable), bot profile name or username + +Available Commands: + api Send an API call to slack + auth Prints authentication information for the Slack API (treat output as secret) + completion Generate the autocompletion script for the specified shell + help Help about any command + read Reads a Slack channel and outputs the messages as markdown + send Sends a message to a Slack channel + +Flags: + -h, --help help for gh-slack + -v, --verbose Show verbose debug information + +Use "gh-slack [command] --help" for more information about a command. +``` ## Configuration diff --git a/cmd/gh-slack/cmd/read.go b/cmd/gh-slack/cmd/read.go index ae411e4..780d6de 100644 --- a/cmd/gh-slack/cmd/read.go +++ b/cmd/gh-slack/cmd/read.go @@ -25,7 +25,7 @@ var readCmd = &cobra.Command{ return readSlack(args) }, Example: ` gh-slack read - gh-slack read -i `, + gh-slack read --details --issue `, } var ( diff --git a/cmd/gh-slack/cmd/root.go b/cmd/gh-slack/cmd/root.go index 2590895..4d4a41a 100644 --- a/cmd/gh-slack/cmd/root.go +++ b/cmd/gh-slack/cmd/root.go @@ -35,7 +35,7 @@ var rootCmd = &cobra.Command{ Use: "gh-slack [command]", Short: "Command line tool for interacting with Slack through gh cli", Long: `A command line tool for interacting with Slack through the gh cli.`, - Example: ` gh-slack -i # defaults to read command + Example: ` gh-slack --details --issue # defaults to read command gh-slack read gh-slack read -i gh-slack send -m -c -t