Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [00:25:00] <terencehill> graphitemaster: btw I have another issue, maybe depending from gmqcc, not sure. In mingw color codes are screwed up, they seem uncomplete ←[0;36mhud.qc:4451:0: ←[0;31merror: ←[0mexpected operator or end of statement
- [00:25:18] <@Samual> terencehill: graphitemaster: I have that same problem
- [00:25:21] <@Samual> graphitemaster doesn't seem to care
- [00:25:28] <@Samual> but it should be fixed
- [00:25:30] <terencehill> ffs.... :/
- ....
- [00:32:14] <graphitemaster> thats because your console doesn't support ASCI color escape sequences
- [00:32:23] <graphitemaster> you must be using cmd.exe or some ugly shit
- [00:32:30] <graphitemaster> just call gmqcc with -nocolor to disable it
- [00:32:45] <graphitemaster> note, there is no easy way to 'determine' if the terminal supports color, EXPECIALLY on windows.
- [00:33:03] <graphitemaster> so there is either a, always assume no color on windows (which is what I do iirc)
- [00:33:38] <graphitemaster> on linxu it's easier but also requires additional libraries which I don't want to depend on.
- [00:33:54] <graphitemaster> On linux I always assume color. I can't think of a console that doesn't support color on linux.
- [00:34:16] <graphitemaster> If you're one of those people then again -nocolor will turn it off.
- [00:34:37] <graphitemaster> *ASCII
- [00:35:06] <graphitemaster> This is documented in the man pages and the website.
- [00:35:26] <graphitemaster> If you're experiencing colors on windows in cmd.exe then there is something wrong with gmqcc.
- [00:35:52] <graphitemaster> but if you're using cmd.exe in windows to begin with then there is something wrong with you.
- [00:37:04] <graphitemaster> On windows there is the WinAPI route to doing colors. I'm just not all that 'into' it.
- [00:39:55] utack [~utack@mnch-5d875a27.pool.mediaWays.net] è entrato in #xonotic
- [00:46:27] dimaursu16 [~dimon@host-static-109-185-145-246.moldtelecom.md] è uscito da IRC: Ping timeout: 245 seconds
- [00:46:45] <terencehill> graphitemaster: I can see colors in my console, they are broken only in the gmqcc output. Is it normal?
- [00:47:05] <@Samual> graphitemaster: you're really using the wrong method for colors I think
- [00:47:18] <@Samual> graphitemaster: applications like VIM and such handle colors perfectly fine
- [00:47:27] <@Samual> you should use a more standard way to do it probably
- [00:48:05] <+xonotify> git: samual@xonotic-data.pk3dir.git/: [samual/combined_updates] Samual Lenks * 62d9700762e0 qcsrc/menu/xonotic/dialog_settings_input.c: Redisplay the menu when selecting input type
- [00:48:59] <graphitemaster> terencehill, what console do you use, which os?
- [00:49:05] <@Samual> graphitemaster: we both use the default install of msys
- [00:49:16] <graphitemaster> what console is that
- [00:49:55] <graphitemaster> according to google it's just a windows command shell window.
- [00:50:00] <graphitemaster> which is why those colors are not working.
- [00:50:11] <graphitemaster> vim and others work because they use the WinAPI method of doing colors
- [00:50:19] <@Samual> It's some specialized version of cmd.exe I guess, it works quite well relatively
- [00:50:23] <graphitemaster> this is part of libncurses clever amount of fuckery to get there.
- [00:50:36] <graphitemaster> and I'm not adding libcurses as a dependency to gmqcc.
- [00:50:46] <@Samual> graphitemaster: git and a bajillion other binaries also have proper colors
- [00:50:51] <@Samual> I don't think you need libncurses
- [00:50:56] <@Samual> I think you just need to not suck
- [00:51:00] <terencehill> cmd.exe surely doesn't support those color codes, mingw does
- [00:51:29] <terencehill> or whatever is the right name of this console
- [00:51:41] <@Samual> graphitemaster: These color codes you use only support bash
- [00:51:45] <@Samual> graphitemaster: It's not standard
- [00:51:46] <graphitemaster> git depends heavily on gnu utilities to do it.
- [00:51:48] <graphitemaster> no
- [00:51:50] forseti- [~forseti@189.135.22.159] è entrato in #xonotic
- [00:51:55] <graphitemaster> THEY ARE STANDARD ASCII ESCAPE SEQUENCES
- [00:52:02] <graphitemaster> it's defined in ASCII standard for christ sake
- [00:52:10] <graphitemaster> windows doesn't support it because windows sucks major balls.
- [00:52:43] <@Samual> no, pretty sure these colors are also not supported on non-bash shells
- [00:52:53] <@Samual> as it doesn't work on the centos server I use
- [00:52:57] <graphitemaster> look I've read the ansii standard.
- [00:52:58] <@Samual> (which doesn't use bash)
- [00:53:00] <graphitemaster> *ascii
- [00:53:09] <graphitemaster> so you're wrong I'm right, by default.
- [00:53:11] <@Samual> graphitemaster: sure, it likely ignores the escape sequences in that case
- [00:53:14] <graphitemaster> because I've actually read the standard.
- [00:53:17] <@Samual> but the colors don't work
- [00:53:18] <@Samual> that's my point
- [00:53:30] <graphitemaster> They don't work because cmd.exe doesn't support them.
- [00:53:36] <@Samual> no, i'm talking about normal shells
- [00:53:39] <graphitemaster> vim and other utilities use termcap/curses to achieve the right result.
- [00:53:54] <graphitemaster> the normal shell you speak of either a) doesn't suport them or b) has support for it off by default.
- [00:54:26] <@Samual> on centos the colors do not work in gmqcc, but works fine with git and vim and such
- [00:54:36] <graphitemaster> export $TERM
- [00:54:37] <@Samual> because it does not use bash
- [00:54:37] <graphitemaster> please on centos
- [00:54:52] <graphitemaster> THE SHELL INTERPRETER HAS NOTHING TO DO WITH COLOR SUPPORT
- [00:55:00] <graphitemaster> it's the terminal emulator
- [00:55:00] <terencehill> MSYS, a contraction of "Minimal SYStem", is a Bourne Shell command line interpreter system. Offered as an alternative to Microsoft's cmd.exe, .....
- [00:55:23] <graphitemaster> echo $TERM for me
- [00:56:21] <@Samual> xterm
- [00:56:23] <graphitemaster> run ls --color too
- [00:56:35] <@Samual> works fine
- [00:56:37] <@Samual> (shows color)
- [00:56:40] <terencehill> cygwin for me
- [00:56:47] <graphitemaster> export TERM=xterm-color
- [00:56:51] <graphitemaster> now run gmqcc
- [00:56:54] <@Samual> wtf you're using cygwin terencehill?
- [00:56:56] <bencoh> quite not the same ting, but ...
- [00:56:58] <terencehill> works fine for me
- [00:57:11] <terencehill> it seems so
- [00:57:17] <@Samual> standard installs don't work with cygwin
- [00:57:22] <@Samual> that's why we say "don't use it"
- [00:57:23] <graphitemaster> or xterm-256color for term
- [00:57:26] <@Samual> if something breaks, you deal with it :P
- [00:57:31] <graphitemaster> anyways xterm by default doesn't enable color support.
- [00:57:40] <graphitemaster> termcap will change the terminal to color mode implicitly if it thinks it can do it.
- [00:57:42] <terencehill> ah maybe because I installed msysgit long time ago
- [00:58:08] <@Samual> graphitemaster: this doesn't change the fact that if gmqcc wants to do colors, it should do them the proper way
- [00:58:17] <@Samual> graphitemaster: or it should detect that the shell doesn't support it, and auto disable
- [00:58:19] <graphitemaster> this is the proper way to do colors.
- [00:58:23] <@Samual> no, it's not
- [00:58:25] <@Samual> CLEARLY it's not
- [00:58:29] <graphitemaster> it's impossible to detect the shell without scanning the processes memory
- [00:58:39] <graphitemaster> termcap has a 25MB database of capailities I'd have to ship with gmqcc
- [00:58:43] <graphitemaster> and a 18MB library
- [00:58:52] <graphitemaster> so if you want that solution, you can have it
- [00:59:02] <graphitemaster> I don't though
- [00:59:07] <graphitemaster> termcap is never the right way.
- [00:59:23] <graphitemaster> http://en.wikipedia.org/wiki/Termcap
- [01:00:01] <graphitemaster> I shudder at the idea.
- [01:00:11] <graphitemaster> Really there is only two ways to do colors right in terminal applications
- [01:00:18] <graphitemaster> 1: depend on termcap or curses to do it for you
- [01:00:35] <graphitemaster> 2: just implicitly assume everyone has a ANSII color supporting terminal emulator
- [01:00:48] <graphitemaster> #2 is hard to justify because people use shit software still.
- [01:01:03] <graphitemaster> go use urvxt or something better instead of cmd.exe.
- [01:01:04] <graphitemaster> or use -nocolor
- [01:01:06] <graphitemaster> it's that easy.
- [01:01:42] <graphitemaster> or
- [01:01:59] <@Samual> http://stackoverflow.com/questions/6216339/mingw-msys-shell-colors
- [01:02:31] <graphitemaster> "Though i'll point out that I still haven't figured out how to get an arbitrary program to switch the terminal into the correct mode to interpret the color signals. Currently to make my unit tests print out all pretty I have to pipe the command through cat, for example"
- [01:02:39] <graphitemaster> yes, so I need to pipe everything through cat in gmqcc now?
- [01:02:42] <graphitemaster> give me a break.
- [01:02:53] <graphitemaster> it's literally horrific
- [01:03:10] <@Samual> I'm telling you that this is broken and should be fixed in some way
- [01:03:10] <graphitemaster> there simply isn't a way to switch it into interpreting color codes without tons of fuckery.
- [01:03:18] <@Samual> and if it's not fixed, then we'll just disable colors for all users
- [01:03:19] <graphitemaster> it's unfixiable without a library or lots of code.
- [01:03:22] <@Samual> as it is broken for some
- [01:03:33] <graphitemaster> those 'some' people are the issue
- [01:03:40] <graphitemaster> they're using broken non conforming ansi terminals.
- [01:03:48] <@Samual> the entirety of Windows users cannot get colors working with gmqcc
- [01:03:51] <@Samual> unacceptable
- [01:03:52] <graphitemaster> I'm not breaking any rules. I'm following a STANDARD.
- [01:04:07] <graphitemaster> windows isn't. I'm correct windows isn't.
- [01:04:08] <Ablu> lets all follow the FHS on windows
- [01:04:10] <graphitemaster> It's as simple as that.
- [01:04:29] <graphitemaster> Microsoft REMOVED support for it since XP
- [01:04:34] <graphitemaster> they removed it after Windows 98 iirc
- [01:05:07] <graphitemaster> you can get it back if you copy a ANSI.SYS into your driver folder form a Windows 98 install CD ;)
- [01:05:13] <graphitemaster> I shit you not.
- [01:05:21] <graphitemaster> but I doubt that works on modern windows
- [01:05:49] <graphitemaster> You can disable color if you want by default.
- [01:05:58] <graphitemaster> I don't really care, you're hurting users when you do that though.
- [01:06:53] MrBougo [~MrBougo@xonotic/contributor/MrBougo] è uscito da IRC: Quit: WeeChat 0.4.2
- [01:07:12] <graphitemaster> https://www.liferay.com/web/igor.spasic/blog/-/blogs/enable-ansi-colors-in-windows-command-prompt
- [01:07:22] <graphitemaster> http://softkube.com/blog/ansi-command-line-colors-under-windows/
- [01:07:26] <graphitemaster> use one of these if you have to.
- [01:07:58] <graphitemaster> http://stackoverflow.com/questions/16755142/how-to-make-win32-console-recognize-ansi-vt100-escape-sequences
- [01:08:08] <graphitemaster> http://en.wikipedia.org/wiki/ANSI_escape_code#Windows_and_DOS
- [01:08:28] <@Samual> but that's another dependency which needs to be done, and it's not as reliable as just using curses as it doesn't support the other shells which also reject ANSI color codes
- [01:08:31] <@Samual> so, no
- [01:08:56] <graphitemaster> look. I'm not adding curses or termcap to gmqcc.
- [01:09:01] <graphitemaster> I have to go play a game of cards now.
- [01:09:04] <@Samual> then i'm disabling color support in gmqcc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement