@@ -392,8 +392,6 @@ func LoadShortcuts() {
392
392
// prints help to chat view
393
393
func PrintHelp () {
394
394
cmdPrefix := config .Config .General .CmdPrefix
395
- fmt .Fprintln (textView , "[::b]WhatsCLI " + VERSION + "[-]" )
396
- fmt .Fprintln (textView , "" )
397
395
fmt .Fprintln (textView , "[-::u]Keys:[-::-]" )
398
396
fmt .Fprintln (textView , "" )
399
397
fmt .Fprintln (textView , "Global" )
@@ -410,6 +408,15 @@ func PrintHelp() {
410
408
fmt .Fprintln (textView , "[::b]" , config .Config .Keymap .MessageRevoke , "[::-] = Revoke message" )
411
409
fmt .Fprintln (textView , "[::b]" , config .Config .Keymap .MessageInfo , "[::-] = Info about message" )
412
410
fmt .Fprintln (textView , "" )
411
+ fmt .Fprintln (textView , "Config file in ->" , config .GetConfigFilePath ())
412
+ fmt .Fprintln (textView , "" )
413
+ fmt .Fprintln (textView , "Type [::b]" + cmdPrefix + "commands[::-] to see all commands" )
414
+ fmt .Fprintln (textView , "" )
415
+ }
416
+
417
+ func PrintCommands () {
418
+ cmdPrefix := config .Config .General .CmdPrefix
419
+ fmt .Fprintln (textView , "" )
413
420
fmt .Fprintln (textView , "[-::u]Commands:[-::-]" )
414
421
fmt .Fprintln (textView , "" )
415
422
fmt .Fprintln (textView , "[-::-]Global[-::-]" )
@@ -434,12 +441,10 @@ func PrintHelp() {
434
441
fmt .Fprintln (textView , "[::b] " + cmdPrefix + "remove[::-] [user-id[] = Remove user from group" )
435
442
fmt .Fprintln (textView , "[::b] " + cmdPrefix + "admin[::-] [user-id[] = Set admin role for user in group" )
436
443
fmt .Fprintln (textView , "[::b] " + cmdPrefix + "removeadmin[::-] [user-id[] = Remove admin role for user in group" )
444
+ fmt .Fprintln (textView , "" )
437
445
fmt .Fprintln (textView , "Use[::b]" , config .Config .Keymap .Copyuser , "[::-]to copy a selected user id to clipboard" )
438
446
fmt .Fprintln (textView , "Use[::b]" , config .Config .Keymap .Pasteuser , "[::-]to paste clipboard to text input" )
439
447
fmt .Fprintln (textView , "" )
440
- fmt .Fprintln (textView , "Configuration:" )
441
- fmt .Fprintln (textView , " ->" , config .GetConfigFilePath ())
442
- fmt .Fprintln (textView , "" )
443
448
}
444
449
445
450
// called when text is entered by the user
@@ -453,13 +458,16 @@ func EnterCommand(key tcell.Key) {
453
458
}
454
459
cmdPrefix := config .Config .General .CmdPrefix
455
460
if sndTxt == cmdPrefix + "help" {
456
- //command
457
461
PrintHelp ()
458
462
textInput .SetText ("" )
459
463
return
460
464
}
465
+ if sndTxt == cmdPrefix + "commands" {
466
+ PrintCommands ()
467
+ textInput .SetText ("" )
468
+ return
469
+ }
461
470
if sndTxt == cmdPrefix + "quit" {
462
- //command
463
471
sessionManager .CommandChannel <- messages.Command {"disconnect" , nil }
464
472
app .Stop ()
465
473
return
0 commit comments