Fossil SCM

An attempt to improve the built-in documentation for the "fossil chat" command.

drh 2021-10-26 18:55 trunk
Commit 56d23baba1d41912fd446d32c6ae412192ee1b9ebf9247347f9209e8b9ceab76
1 file changed +14 -7
+14 -7
--- src/chat.c
+++ src/chat.c
@@ -804,27 +804,34 @@
804804
** URL shows when you run the "fossil remote" command) or to the URL
805805
** specified by the --remote option. If there is no default remote
806806
** Fossil repository and the --remote option is omitted, then this
807807
** command fails with an error.
808808
**
809
-** When there is no SUBCOMMAND (when this command is simply "fossil chat")
810
-** the response is to bring up a web-browser window to the chatroom
811
-** on the default system web-browser. You can accomplish the same by
812
-** typing the appropriate URL into the web-browser yourself. This
813
-** command is merely a convenience for command-line oriented people.
809
+** Subcommands:
810
+**
811
+** > fossil chat
814812
**
815
-** The following subcommands are supported:
813
+** When there is no SUBCOMMAND (when this command is simply "fossil chat")
814
+** the response is to bring up a web-browser window to the chatroom
815
+** on the default system web-browser. You can accomplish the same by
816
+** typing the appropriate URL into the web-browser yourself. This
817
+** command is merely a convenience for command-line oriented people.
816818
**
817819
** > fossil chat send [ARGUMENTS]
818820
**
819821
** This command sends a new message to the chatroom. The message
820822
** to be sent is determined by arguments as follows:
821823
**
822824
** -f|--file FILENAME File to attach to the message
823825
** -m|--message TEXT Text of the chat message
826
+** --remote URL Send to this remote URL
824827
** --unsafe Allow the use of unencrypted http://
825828
**
829
+** > fossil chat url
830
+**
831
+** Show the default URL used to access the chat server.
832
+**
826833
** Additional subcommands may be added in the future.
827834
*/
828835
void chat_command(void){
829836
const char *zUrl = find_option("remote",0,1);
830837
int urlFlags = 0;
@@ -948,11 +955,11 @@
948955
}
949956
fossil_fatal("unable to send the chat message");
950957
}
951958
blob_reset(&down);
952959
}else if( strcmp(g.argv[2],"url")==0 ){
953
- /* Undocumented command. Show the URL to access chat. */
960
+ /* Show the URL to access chat. */
954961
fossil_print("%s/chat\n", zUrl);
955962
}else{
956963
fossil_fatal("no such subcommand \"%s\". Use --help for help", g.argv[2]);
957964
}
958965
}
959966
--- src/chat.c
+++ src/chat.c
@@ -804,27 +804,34 @@
804 ** URL shows when you run the "fossil remote" command) or to the URL
805 ** specified by the --remote option. If there is no default remote
806 ** Fossil repository and the --remote option is omitted, then this
807 ** command fails with an error.
808 **
809 ** When there is no SUBCOMMAND (when this command is simply "fossil chat")
810 ** the response is to bring up a web-browser window to the chatroom
811 ** on the default system web-browser. You can accomplish the same by
812 ** typing the appropriate URL into the web-browser yourself. This
813 ** command is merely a convenience for command-line oriented people.
814 **
815 ** The following subcommands are supported:
 
 
 
 
816 **
817 ** > fossil chat send [ARGUMENTS]
818 **
819 ** This command sends a new message to the chatroom. The message
820 ** to be sent is determined by arguments as follows:
821 **
822 ** -f|--file FILENAME File to attach to the message
823 ** -m|--message TEXT Text of the chat message
 
824 ** --unsafe Allow the use of unencrypted http://
825 **
 
 
 
 
826 ** Additional subcommands may be added in the future.
827 */
828 void chat_command(void){
829 const char *zUrl = find_option("remote",0,1);
830 int urlFlags = 0;
@@ -948,11 +955,11 @@
948 }
949 fossil_fatal("unable to send the chat message");
950 }
951 blob_reset(&down);
952 }else if( strcmp(g.argv[2],"url")==0 ){
953 /* Undocumented command. Show the URL to access chat. */
954 fossil_print("%s/chat\n", zUrl);
955 }else{
956 fossil_fatal("no such subcommand \"%s\". Use --help for help", g.argv[2]);
957 }
958 }
959
--- src/chat.c
+++ src/chat.c
@@ -804,27 +804,34 @@
804 ** URL shows when you run the "fossil remote" command) or to the URL
805 ** specified by the --remote option. If there is no default remote
806 ** Fossil repository and the --remote option is omitted, then this
807 ** command fails with an error.
808 **
809 ** Subcommands:
810 **
811 ** > fossil chat
 
 
812 **
813 ** When there is no SUBCOMMAND (when this command is simply "fossil chat")
814 ** the response is to bring up a web-browser window to the chatroom
815 ** on the default system web-browser. You can accomplish the same by
816 ** typing the appropriate URL into the web-browser yourself. This
817 ** command is merely a convenience for command-line oriented people.
818 **
819 ** > fossil chat send [ARGUMENTS]
820 **
821 ** This command sends a new message to the chatroom. The message
822 ** to be sent is determined by arguments as follows:
823 **
824 ** -f|--file FILENAME File to attach to the message
825 ** -m|--message TEXT Text of the chat message
826 ** --remote URL Send to this remote URL
827 ** --unsafe Allow the use of unencrypted http://
828 **
829 ** > fossil chat url
830 **
831 ** Show the default URL used to access the chat server.
832 **
833 ** Additional subcommands may be added in the future.
834 */
835 void chat_command(void){
836 const char *zUrl = find_option("remote",0,1);
837 int urlFlags = 0;
@@ -948,11 +955,11 @@
955 }
956 fossil_fatal("unable to send the chat message");
957 }
958 blob_reset(&down);
959 }else if( strcmp(g.argv[2],"url")==0 ){
960 /* Show the URL to access chat. */
961 fossil_print("%s/chat\n", zUrl);
962 }else{
963 fossil_fatal("no such subcommand \"%s\". Use --help for help", g.argv[2]);
964 }
965 }
966

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button