Questions about windows support

Nick Sabalausky a at a.a
Tue Feb 21 14:25:28 PST 2012


"Nick Sabalausky" <a at a.a> wrote in message 
news:ji0s7e$81a$1 at digitalmars.com...
> "Adam D. Ruppe" <destructionator at gmail.com> wrote in message 
> news:veaiisjzbijgdjbzwjif at forum.dlang.org...
>> On Tuesday, 21 February 2012 at 03:53:20 UTC, H. S. Teoh wrote:
>>
>>> Heh, never seen that before. I usually just turn off all fancy settings
>>> after installing a new system, and just stick with a bare-bones prompt.
>>
>> I like slackware's default of \u@\h:\w\$
>>
>> Simple, informative, reliable.
>>
>
> That's default on Debian and Ubuntu, too. And if you're root, the "$" 
> changes to "#" (I think that's pretty common though...?).
>
> I used to find the "\u@\h" kinda pointless, especially the "@\h" part. But 
> now that I'm dealing more and more with multiple machines/VMs/users, ssh, 
> etc., I absolutely love it.
>

On other thing I meant to mention: It's kinda annoying on Linux how if you 
launch a gui app at the command line, it will automatically be a blocking 
foreground process unless you remember to add "&" at the end. Which I always 
forget. And even then, a lot of GUI apps (most notably KDE) will flood the 
cmd window with stdout/stdin. On windows, none of that happends: whenever 
you launch a process from the command line it does the most useful thing 
depending if it's a GUI or cmdline app. I had so much trouble getting used 
to the Linus behavior I created a couple tiny scripts to help out:

$ cat ~/bin/gui
#!/bin/sh
"$@" > /dev/null 2> /dev/null &

$ cat ~/bin/guisudo
#!/bin/sh
gui kdesudo "$@"

I still have to remember to prepend each gui-lauching command with "gui " or 
"guisudo ", but it works a lot better for me (except when the command I 
typed doesn't exist and I don't get any message saying so).

Again, Linux's comand line totally blows Windows out of the water, no doubt, 
but there are still a few niceities with Windows.

Another one is that in windows, it's possible for a batch script to export 
env vars when it chooses too. Granted, it's done in an *extremely* sloppy 
and haphazard way, and it shouldn't be the default, but at least it's 
possible.

I totally understand the technical and hygenic reasons why Linux requires 
scripts to be sourced for their env var exports to...well, be exported, but 
the fact that it's impossible for the script to override that forces DVM, 
for instance, to stick a "dvm" shell function inside '.bashrc'. Otherwise, 
you'd have to remember to run it like ". dvm use 2.058" for it to actualy 
work. On windows, when you type "dvm ..." it just runs an ordinary batch 
file.




More information about the Digitalmars-d mailing list