erming / shout

Deprecated. See fork @ https://github.com/thelounge
MIT License
3.62k stars 272 forks source link

support for /j as an alias for /join #364

Open fczuardi opened 9 years ago

fczuardi commented 9 years ago

Other IRC clients have by default a shorter version of the /join command, /j.

I think this could be a simple/nice to have enhancement.

nwgat commented 9 years ago

same with operator commands like /v = /voice

docwhat commented 9 years ago

and /l => /leave

ghost commented 9 years ago

It should be /p -> /part.

There is no such thing as /LEAVE. That's probably an IRC client specific alias.

docwhat commented 9 years ago

Yeah, my bad. sigh.

erming commented 9 years ago

Yeah, I could add a couple of more shorthands. But you guys should try pressing TAB to complete commands. Like this /p<TAB>. You can even tabcomplete after just typing / to iterate all the available commands.

@ircer, @docwhat: I guess you're both right. Haha. LEAVE is not a valid IRC command. But I implemented both /part and /leave (and even /close) to close the current channel/query.

Code here for reference: https://github.com/erming/shout/blob/master/src/plugins/inputs/part.js

Feel free to dig into any of the files in src/plugins/inputs/ to add your own shorthands.

Also, I'll leave this here: http://shout-irc.com/docs/client/commands.html

Anyway, lets make a list of shorthands that would be nice to have:

/j, /join /p, /part /l, /leave /v, /voice /m, /msg

floogulinc commented 9 years ago

We did something simular to this here: https://github.com/PonyChat/Shuo/pull/30

I only added aliases for the most used commands, as to prevent mistakes as well as the fact you can already type the first letter and hit tab.

JocelynDelalande commented 9 years ago

Anyway, lets make a list of shorthands that would be nice to have:

/q, /query

Manouchehri commented 8 years ago

It's slightly confusing to have no output when you use /j by mistake either, since you're not sure if it's just lagging.

astorije commented 8 years ago

Please take a look at an earlier comment of mine regarding this issue. I am still :-1: on this considering the helpful tab completion.

Manouchehri commented 8 years ago

Is there any reason not to give an unknown command error though? I can't see the benefit of silently failing.

astorije commented 8 years ago

Indeed, I believe failed commands should not be silent. However, I believe there was a good reason for this but I can't remember why. Does @JocelynDelalande or @erming remember?

If not, please feel free to open an issue and a PR for this, unless there are already some on the subject. Thanks!

JocelynDelalande commented 8 years ago

Indeed, I believe failed commands should not be silent. However, I believe there was a good reason for this but I can't remember why. Does @JocelynDelalande or @erming remember?

No good reason that I can see/remember, so PR welcome :)

hormigas commented 8 years ago

I guess you're both right. Haha. LEAVE is not a valid IRC command. But I implemented both /part and /leave (and even /close) to close the current channel/query.

The /close command is a ircops command for at least some servers (such as unrealircd).

This is related to what I've said in 528. It might be best to only handle commands that you want to alter specific behavior for (such as /part working without including the current channel name).