On 04/02/10 10:26, David Frascone wrote:
> So, how do you think this should be generically fixed?
>
> In my tree, I simply commented out the /dev/tty setting.  But, I don't want
> to break things for linux.  And, I don't want to have conditional
> compilations, if they can be avoided.

as you wish... I think conditional compilation for accessing Linux vs. 
Darwin /dev/ filenames makes a ton of sense. (Or use a C if() and a 
system-call that tells you which system it is, if you wish, if such a 
thing exists... it's conventional to use conditional-compilation!)  But 
you'll have to tell me, what is the exact naming convention that 
Darwin/OSX uses? (for example, is "/dev/tty1" a device-name on Darwin, 
or not? If not, then we can tell the difference just based on the names, 
with just a small bit of coding.)

> Should I abuse another environment variable?  Even still, how should it
> look?
>
> #linux
> set FISH_TERMINALS_WITH_TITLES "/dev/pts" "whatever screen uses"
>
> #osx
> set FISH_TERMINALS_WITH_TITLES "/dev/tty" "whatever screen uses"
>
> Then the code can go through that and do the strnstr?  I don't particularly
> like adding more "special" environment variables either, but I like it
> better than conditional compilation.

I suppose special fish environment variables could be used... make sure 
that they're initialized correctly for each system though, even if you 
share ~/.config/fish/ between a Mac and a Linux system and go back and 
forth... and it would clearly be just as much conditional as compiling 
it into the C code.  And I can tell that you're not engineering with 
weird hackers on weird embedded Linux setups in mind, so this 
configurability would probably not be useful even for dealing with that.

-Isaac

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to