Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format multiline command results consistently #275

Open
shazow opened this issue Aug 31, 2018 · 2 comments
Open

Format multiline command results consistently #275

shazow opened this issue Aug 31, 2018 · 2 comments

Comments

@shazow
Copy link
Owner

shazow commented Aug 31, 2018

Right now we have at least three variants:

[Guest3293] /help
-> Available commands:
/exit               - Exit the chat.
/ignore [USER]      - Hide messages from USER, /unignore USER to stop hiding.
/msg USER MESSAGE   - Send MESSAGE to USER.
/names              - List users who are connected.
/nick NAME          - Rename yourself.
/quiet              - Silence room announcements.
/reply MESSAGE      - Reply with MESSAGE to the previous private message.
/theme [colors|...] - Set your color theme.
/timestamp          - Timestamps after 30min of inactivity.
/whois USER         - Information about USER.
[Guest3293] /whois steve
-> name: steve
 > fingerprint: SHA256:stevedidntwanthisfingerprintincludedsoiediteditout=
 > client: SSH-2.0-OpenSSH_7.7
 > joined: 7 hours ago
[Guest3293] /theme
-> Current theme: colors
   Themes available: colors, solarized, hacker, mono

Open to debate for which format is best. Kinda leaning on what /theme is doing, just because /help would be confusing with > prefixes?

@sleibrock
Copy link
Contributor

I think I like the three leading spaces the most, it would be easy to implement across the board.

/help

[Guest3293] /help
-> Available commands:
   /exit               - Exit the chat.
   /ignore [USER]      - Hide messages from USER, /unignore USER to stop hiding.
   /msg USER MESSAGE   - Send MESSAGE to USER.
   /names              - List users who are connected.
   /nick NAME          - Rename yourself.
   /quiet              - Silence room announcements.
   /reply MESSAGE      - Reply with MESSAGE to the previous private message.
   /theme [colors|...] - Set your color theme.
   /timestamp          - Timestamps after 30min of inactivity.
   /whois USER         - Information about USER.

Maybe we could also change /whois since it seems a little redundant to include name: user? Would something like the following look better?

[Guest3293] /whois steve
-> WHOIS for "steve":
   fingerprint: SHA256:stevedidntwanthisfingerprintincludedsoiediteditout=
   client: SSH-2.0-OpenSSH_7.7
   joined: 7 hours ago

@shazow
Copy link
Owner Author

shazow commented Aug 31, 2018

@sleibrock Eh I wouldn't mess with the whois output. key: value format is more consistent, in case someone like yourself had to parse that output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants