Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Very good tip for terminal.

Very good tip for terminal.
Thread Tools
netgo
Junior Member
Join Date: Jan 2002
Status: Offline
Reply With Quote
Jan 28, 2002, 08:05 AM
 
Try this.

At terminal prompt,

vi .cshrc

type SHIFT g and return
type O
type alias cd 'cd \!*; echo -n "^[]0;`pwd`^G"'
type ESC
type SHIFT zz

shift and esc - press correct keyboard

to type ^[

CTRL-v and ESC

to type ^G

CTRL-v and CTRL-G

Quit terminal and relaunch~

You can see the title window is dynamically changes when you change your working directory.

Sorry for confusion. To make this easy, I made a small script.

download 'termtip' from

homepage.mac.com/wujekim

% chmod +x termtip
% ./termtip
% source ~/.cshrc

You can remove 'termtip' file now. Don't run termtip twice.

Power of Unix

[ 01-28-2002: Message edited by: netgo ]

[ 01-28-2002: Message edited by: netgo ]

[ 01-28-2002: Message edited by: netgo ]
Apple G4 Cube 450/1.5GB(3 133Mhz 512MB Dimm)/CDRW/WD 7200RPM 120GB/GeForce3/Fan/Apple 17" LCD/SoundStick/HP G85
External WD 7200RPM 120GB firewire
Logitech Wireless keyboard and mouse
iMic, Palm usb-serial, a Router, powered usb hub
     
jokell82
Professional Poster
Join Date: May 2001
Location: Hampton Roads, VA
Status: Offline
Reply With Quote
Jan 28, 2002, 09:02 AM
 
Originally posted by netgo:
<STRONG>Try this.

At terminal prompt,

vi .cshrc

type SHIFT g and return
type O
type alias cd 'cd \!; echo -n "^[]0;`pwd`^G"'
type ESC
type SHIFT zz

shift and esc - press correct keyboard

to type ^[

CTRL-v and ESC

to type ^G

CTRL-v and CTRL-G

Quit terminal and relaunch~

You can see the title window is dynamically changes when you change your working directory.

Power of Unix

[ 01-28-2002: Message edited by: netgo ]</STRONG>
Maybe if you explained what this did I would try it. However, for all I know this could be one long "rm -rf /"

So what does it do?

All glory to the hypnotoad.
     
Han's Hands on Leia
Mac Enthusiast
Join Date: May 2001
Location: Copping a feel on Endor
Status: Offline
Reply With Quote
Jan 28, 2002, 09:16 AM
 
Originally posted by jokell82:
<STRONG>

Maybe if you explained what this did I would try it. However, for all I know this could be one long "rm -rf /"

So what does it do?</STRONG>
"You can see the title window is dynamically changes when you change your working directory."

"I thought they smelt bad on the outside."
     
eno
Banned
Join Date: Sep 2000
Location: Fightclub
Status: Offline
Reply With Quote
Jan 28, 2002, 09:33 AM
 
Don't see why or how this could work.

In fact, it doesn't.
     
jokell82
Professional Poster
Join Date: May 2001
Location: Hampton Roads, VA
Status: Offline
Reply With Quote
Jan 28, 2002, 10:15 AM
 
Originally posted by Han's Hands on Leia:
<STRONG>

"You can see the title window is dynamically changes when you change your working directory."</STRONG>
Maybe I just wanted it in english.

All glory to the hypnotoad.
     
Spheric Harlot
Clinically Insane
Join Date: Nov 1999
Location: 888500128, C3, 2nd soft.
Status: Offline
Reply With Quote
Jan 28, 2002, 10:19 AM
 
Originally posted by Han's Hands on Leia:
<STRONG>"You can see the title window is dynamically changes when you change your working directory."</STRONG>
How's that for the Gratuitous Stupid Post of the Day Award?

Thank you for enlightenment. Next time, don't think with your hands.



Now, can somebody perhaps explain what those commands actually do, step by step? Thank you.

-chris.
     
ChaChi Boy
Senior User
Join Date: Dec 2001
Location: Toronto, ON
Status: Offline
Reply With Quote
Jan 28, 2002, 10:36 AM
 
Originally posted by Spheric Harlot:
<STRONG>

How's that for the Gratuitous Stupid Post of the Day Award?

Thank you for enlightenment. Next time, don't think with your hands.



-chris.</STRONG>
I guess you don't get it. Oh well.

Iguana: The other green meat.
     
cwasko
Senior User
Join Date: Jul 2000
Status: Offline
Reply With Quote
Jan 28, 2002, 11:02 AM
 
Alrighty, well, after looking at this, there are some problems with the initial post.

I got it to work, and this is what I did:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
% cd ~
% vi .cshrc

&lt;command&gt;SHIFT-o&lt;/command&gt;
alias cd 'cd \!*; echo -n <font color = red>"^[]<font color = blue>0</font>`pwd`^G"</font>'
cd ~
&lt;command&gt;ESC&lt;/command&gt;
&lt;command&gt;SHIFT-zz&lt;/command&gt;
</font>[/code]

Where I've deliniated the areas with the 'command' tag, simple type these commands in with no returns after completion; obviously do not type the &lt;command&gt; stuff.

As originally stated:

To get the '^[' sequence, type: CONTROL-v ESC
To get the '^G' sequence, type: CONTROL-v CONTROL-g


Now, for a better description of what this does: When you have a terminal window open, this will put the path of the current directory in the title bar of the window. This way, if you have multiple terminal windows open, then you can tell which one is in which directory without having to 'remember'.

For those that care, this is what I changed from the original post: First, I have the user do a 'cd ~'. This ensures that the user is in their root directory, which is where the .cshrc file needs to be for this to work. Then, I added the '*' to the aliased cd command. The '*' is required and this is what 'copies' the arguments from the as-typed 'cd' command to the new aliased 'cd' command. I also added a 'cd ~' at the end of the .cshrc file. This makes sure that the user is in their home directory when a new terminal is open and it also makes sure that the directory is prepended to the Terminal Window's title.

[ 01-28-2002: Message edited by: cwasko ]
     
robotmarkVIII
Dedicated MacNNer
Join Date: Jan 2001
Status: Offline
Reply With Quote
Jan 28, 2002, 12:41 PM
 
Originally posted by jokell82:
<STRONG>

Maybe if you explained what this did I would try it. However, for all I know this could be one long "rm -rf /"

So what does it do?</STRONG>
Well, just by looking at it, you have a keyboard virus. Email me and I'll arrange for you to have your machine sent to my home to be disinfected. Don't worry, it happens to all users once in a while. OK?
     
Adam Price
Junior Member
Join Date: Oct 2001
Location: East Coast, U.S.
Status: Offline
Reply With Quote
Jan 28, 2002, 12:48 PM
 
Originally posted by cwasko:
<STRONG>Alrighty, well, after looking at this, there are some problems with the initial post.

I got it to work, and this is what I did:

For those that care, this is what I changed from the original post: First, I have the user do a 'cd ~'. This ensures that the user is in their root directory, which is where the .cshrc file needs to be for this to work. Then, I added the '*' to the aliased cd command. The '*' is required and this is what 'copies' the arguments from the as-typed 'cd' command to the new aliased 'cd' command. I also added a 'cd ~' at the end of the .cshrc file. This makes sure that the user is in their home directory when a new terminal is open and it also makes sure that the directory is prepended to the Terminal Window's title.

[ 01-28-2002: Message edited by: cwasko ]</STRONG>
What passes arguments in Bash? This works for me in cshrc, but in bash I get
<font face = "courier"> bash: cd: 1*: no such file or directory </font>

[ 01-28-2002: Message edited by: Adam Price ]

[ 01-28-2002: Message edited by: Adam Price ]
     
cwasko
Senior User
Join Date: Jul 2000
Status: Offline
Reply With Quote
Jan 28, 2002, 01:44 PM
 
Originally posted by Adam Price:
<STRONG>

What passes arguments in Bash?

</STRONG>
Well, eventhough it may seem like I know something, I figured it out through trial and error. I did look up a few things to figure out that the '*' was required for csh. You could try just deleting the '*' for Bash.
     
netgo  (op)
Junior Member
Join Date: Jan 2002
Status: Offline
Reply With Quote
Jan 28, 2002, 02:55 PM
 
Thank cwasko.

You can change pwd to proper unix command to change the window title.

Actually this tip is Xterminal escape sequence and works well in Aqua.
Apple G4 Cube 450/1.5GB(3 133Mhz 512MB Dimm)/CDRW/WD 7200RPM 120GB/GeForce3/Fan/Apple 17" LCD/SoundStick/HP G85
External WD 7200RPM 120GB firewire
Logitech Wireless keyboard and mouse
iMic, Palm usb-serial, a Router, powered usb hub
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jan 28, 2002, 03:38 PM
 
Is this supposed to work for tcsh as well as csh? I assumed it would but I can't get it working. I know how to edit my .cshrc file so that's not the problem. I get a weird looking prompt (only because echo isn't printing a newline). Here is what comes before my regular prompt:

<font face = "courier">^[]0;/Applications^G</font>

The only thing I can assume is that it won't work for tcsh. I used the exact command cwasko posted.

[edit: I just tried it with csh instead of tcsh. Same problem. Doesn't work.]

[ 01-28-2002: Message edited by: Xeo ]
     
netgo  (op)
Junior Member
Join Date: Jan 2002
Status: Offline
Reply With Quote
Jan 28, 2002, 03:57 PM
 
xeo, it should work in both csh and tcsh environment. Please make sure that you correct escape sequence. ctrl-v ctrl-esc and ctrl-v ctrl-g

Don't copy and paste. You will lose control character info.
Apple G4 Cube 450/1.5GB(3 133Mhz 512MB Dimm)/CDRW/WD 7200RPM 120GB/GeForce3/Fan/Apple 17" LCD/SoundStick/HP G85
External WD 7200RPM 120GB firewire
Logitech Wireless keyboard and mouse
iMic, Palm usb-serial, a Router, powered usb hub
     
netgo  (op)
Junior Member
Join Date: Jan 2002
Status: Offline
Reply With Quote
Jan 28, 2002, 04:09 PM
 
Sorry for confusion. To make this easy, I made a small script.

download 'termtip' from

homepage.mac.com/wujekim

% chmod +x termtip
% ./termtip
% source ~/.cshrc

You can remove 'termtip' file now. Don't run termtip twice.

[ 01-28-2002: Message edited by: netgo ]
Apple G4 Cube 450/1.5GB(3 133Mhz 512MB Dimm)/CDRW/WD 7200RPM 120GB/GeForce3/Fan/Apple 17" LCD/SoundStick/HP G85
External WD 7200RPM 120GB firewire
Logitech Wireless keyboard and mouse
iMic, Palm usb-serial, a Router, powered usb hub
     
rantweasel
Dedicated MacNNer
Join Date: Oct 2001
Location: Philly
Status: Offline
Reply With Quote
Jan 28, 2002, 08:55 PM
 
A alternative to this, for tcsh users, is to add the following line to your .tcshrc file:

set prompt = "%n@%m %~&gt;"

You'll get a prompt that looks like:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier> username@hostname /current/working/directory/using/tilde/for/home&gt; </font>[/code]

it's nifty. Man tcsh (or whatever shell you prefer) for many more variations on this...
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jan 28, 2002, 09:21 PM
 
Ahh, I see. I copied and pasted. I didn't realize I needed specific keyboard input like that. Anyway it still didn't work for me. I only tried once so it was probably a mistype again. However, I downloaded that shell script and now it works.

There is a bug in the shell script though. It doesn't exactly copy the <font face = "courier">`pwd`</font> into the .cshrc file. Since it's a shell script, it first executed that as a command and included the result. Every window had the path to my home directory in it. I manually edited my .cshrc file to include <font face = "courier">`pwd`</font> in place of that path and now it works.

You should fix that shell script though.
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jan 28, 2002, 09:25 PM
 
Originally posted by rantweasel:
<STRONG>it's nifty. Man tcsh (or whatever shell you prefer) for many more variations on this...</STRONG>
I have a custom prompt too. I like having only what I need as a prompt. I recommend using ManOpen or manThor or something like that to view the man pages on tcsh and other shells. They are very long and trying to view them in the terminal can be difficult. You can search for "prompt" with those GUI apps too and get you right where you want to be.

[ 01-28-2002: Message edited by: Xeo ]
     
BlackGriffen
Professional Poster
Join Date: Jul 2001
Location: Dis
Status: Offline
Reply With Quote
Jan 28, 2002, 09:29 PM
 
When will thou blasphemous vi users realize that The One True Editor is emacs! Seriously, I never use vi, I use either emacs or TextEdit, and I may consider using pico, but vi has always felt so kludgy. Please change the instructions to the following:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>cd ~/
open .tcshrc</font>[/code]

then add the following text to the file:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>Insert Text Here</font>[/code]

so that it is more generally understandable.

Thanx
BlackGriffen

[ 01-28-2002: Message edited by: BlackGriffen ]
I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use. -Galileo Galilei, physicist and astronomer (1564-1642)
     
dogzilla
Grizzled Veteran
Join Date: Sep 1999
Location: Boston, MA USA
Status: Offline
Reply With Quote
Jan 28, 2002, 10:14 PM
 
Originally posted by BlackGriffen:
<STRONG>When will thou blasphemous vi users realize that The One True Editor is emacs! </STRONG>
vi is too little, emacs is too much. Pico is juuust right!

And for a change of pace, I put
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
alias bbedit 'open -a /applications/BBEdit/BBedit'
</font>[/code]
in my aliases.mine file and open files in bbedit from the command line. It roxxors.

I like the idea of having the path in the title. Having a prompt that long is kind of a bother for me.
     
netgo  (op)
Junior Member
Join Date: Jan 2002
Status: Offline
Reply With Quote
Jan 28, 2002, 10:34 PM
 
Oops, updated script
Apple G4 Cube 450/1.5GB(3 133Mhz 512MB Dimm)/CDRW/WD 7200RPM 120GB/GeForce3/Fan/Apple 17" LCD/SoundStick/HP G85
External WD 7200RPM 120GB firewire
Logitech Wireless keyboard and mouse
iMic, Palm usb-serial, a Router, powered usb hub
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Jan 29, 2002, 12:10 AM
 
Originally posted by dogzilla:
<STRONG>And for a change of pace, I put
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>alias bbedit 'open -a /applications/BBEdit/BBedit' </font>[/code]
in my aliases.mine file and open files in bbedit from the command line. It roxxors.</STRONG>
You know with BBEdit 6.5 there is the <font face = "courier">bbedit</font> command line tool.
     
Wevah
Senior User
Join Date: Nov 2001
Location: State of Denial
Status: Offline
Reply With Quote
Jan 29, 2002, 12:57 AM
 
Yep, and it works much better than using the above alias...
[Wevah setPostCount:[Wevah postCount] + 1];
     
darcybaston
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Jan 29, 2002, 12:04 PM
 
I find my prompt nice and elegant this way:

set prompt="[%c3]"

Darcy
Macbook (white glossy) 2.16GHz | 4GB RAM | 7200RPM HD | 10.5.x
     
netgo  (op)
Junior Member
Join Date: Jan 2002
Status: Offline
Reply With Quote
Jan 29, 2002, 02:38 PM
 
Here is my prompt

set prompt = "\! `whoami`@`hostname` : "
Apple G4 Cube 450/1.5GB(3 133Mhz 512MB Dimm)/CDRW/WD 7200RPM 120GB/GeForce3/Fan/Apple 17" LCD/SoundStick/HP G85
External WD 7200RPM 120GB firewire
Logitech Wireless keyboard and mouse
iMic, Palm usb-serial, a Router, powered usb hub
     
wil
Mac Enthusiast
Join Date: Oct 2001
Location: Seattle
Status: Offline
Reply With Quote
Feb 1, 2002, 08:28 PM
 
Originally posted by darcybaston:
<STRONG>I find my prompt nice and elegant this way:

set prompt="[%c3]"

Darcy</STRONG>
I'm not very good at terminal command stuff. But I like the simplicity of this. I also like the permanence of the .cshrc file. What would I have to type in the ..cshrc file to get the above prompt permanently?

Thanks!
     
tinrib
Mac Elite
Join Date: Feb 2001
Location: Bristol, UK, living in Melbourne, Australia
Status: Offline
Reply With Quote
Feb 1, 2002, 08:55 PM
 
Originally posted by wil:
<STRONG>

I'm not very good at terminal command stuff. But I like the simplicity of this. I also like the permanence of the .cshrc file. What would I have to type in the ..cshrc file to get the above prompt permanently?

Thanks!</STRONG>
exactly that:

set prompt = "whatever you like"

it's your .cshrc file yeah, not ..cshrc file. That was probably just a typo I know but just in case...
     
wil
Mac Enthusiast
Join Date: Oct 2001
Location: Seattle
Status: Offline
Reply With Quote
Feb 1, 2002, 09:45 PM
 
Originally posted by tinrib:
<STRONG>

exactly that:

set prompt = "whatever you like"

it's your .cshrc file yeah, not ..cshrc file. That was probably just a typo I know but just in case...</STRONG>
Awesome! I didn't realize that the .cshrc file was always automatically read to the terminal. Does that mean I could instruct it to open a telnet prompt or something like that?

I just tried it and it works! I guess what I'm asking is: Does each line in the .cshrc file represent a terminal command/script? And if so, how do you put pauses in? Also, can you specify that only the first terminal window you open runs a particular script?

Thanks again. This is like candy!

[ 02-01-2002: Message edited by: wil ]

[ 02-01-2002: Message edited by: wil ]
     
Camelot
Mac Elite
Join Date: May 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Feb 2, 2002, 04:13 AM
 
Originally posted by wil:
<STRONG>Does that mean I could instruct it to open a telnet prompt or something like that?

Does each line in the .cshrc file represent a terminal command/script? And if so, how do you put pauses in? Also, can you specify that only the first terminal window you open runs a particular script?
</STRONG>
The lines in the .cshrc file are the exact same format as you'd type them on the command line if you were doing it manually.

All the commands are automatically run whenever a new terminal is opened. This means you COULD set a command to telnet to some other machine, but you'd telnet to that machine EVERY TIME you opened a new terminal - probably not what you want.

You can't add pauses because if you did you'd have to wait for the entire .cshrc file to finish before you got your prompt. This means if you have a 1 minute pause in your script, you'd be waiting at least one minute before you were able to do anything on the command line, each time you opened a terminal window.

You can add logic to the script to conditionally run commands based on whatever criteria you decide. A good book on shell scripting is a wonderful read
Gods don't kill people - people with Gods kill people.
     
wil
Mac Enthusiast
Join Date: Oct 2001
Location: Seattle
Status: Offline
Reply With Quote
Feb 2, 2002, 01:21 PM
 
What I'd like to do is have the prompt mirrored in the window title. Terminal windows could be stacked but the current state of each would be easily spotted by glancing at their titles. Not sure how to go about it though!
     
netgo  (op)
Junior Member
Join Date: Jan 2002
Status: Offline
Reply With Quote
Feb 2, 2002, 04:40 PM
 
Will, after run my small script termtip, change 'pwd' to 'echo $prompt' it will display your prompt on window title.
Apple G4 Cube 450/1.5GB(3 133Mhz 512MB Dimm)/CDRW/WD 7200RPM 120GB/GeForce3/Fan/Apple 17" LCD/SoundStick/HP G85
External WD 7200RPM 120GB firewire
Logitech Wireless keyboard and mouse
iMic, Palm usb-serial, a Router, powered usb hub
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Feb 2, 2002, 05:51 PM
 
Originally posted by darcybaston:
<STRONG>I find my prompt nice and elegant this way:

set prompt="[%c3]"

Darcy</STRONG>
Mine is:

<font face = "courier">set prompt="(%c05): "</font>

Very close to yours. I prefer the space afterwards so what I type doesn't attach directly to the prompt. I would prefer [] instead of () but it was a compromise my roommate and I had.
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Feb 2, 2002, 06:02 PM
 
Originally posted by netgo:
<STRONG>Here is my prompt

set prompt = "\! `whoami`@`hostname` : "</STRONG>
My question is why not just use the built in representations of "whoami" and "hostname" unless you aren't using tcsh.

<font face = "courier">`hostname`</font> could be replaced with <font face = "courier">%m</font> for the hostname up to the first dot or <font face = "courier">%M</font> for the whole thing.

<font face = "courier">`whoami`</font> could be replaced with <font face = "courier">%n</font>.

That's why these shortcuts are there. The whole list of shortcuts are in the man pages of tcsh.
     
tobli
Forum Regular
Join Date: Oct 2001
Location: Sweden
Status: Offline
Reply With Quote
Mar 27, 2002, 09:36 AM
 
Originally posted by netgo:
<STRONG>Try this.
...
type alias cd 'cd \!*; echo -n "^[]0;`pwd`^G"'
...
</STRONG>
even better is:
alias cwdcmd 'echo -n "^[]0;`pwd`^G"'

cwdcmd is a command that is run every time the current directory is changed. This way the window title is updated, not just when you use cd, but also on pushd and popd.
     
tobli
Forum Regular
Join Date: Oct 2001
Location: Sweden
Status: Offline
Reply With Quote
Mar 27, 2002, 09:40 AM
 
double post =(

[ 03-27-2002: Message edited by: tobli ]
     
sjk
Forum Regular
Join Date: Feb 2002
Location: Hawaii
Status: Offline
Reply With Quote
Mar 27, 2002, 10:37 PM
 
Originally posted by tobli:
<STRONG>

even better is:
alias cwdcmd 'echo -n "^[]0;`pwd`^G"'

cwdcmd is a command that is run every time the current directory is changed. This way the window title is updated, not just when you use cd, but also on pushd and popd.</STRONG>
Optimized version:

alias cwdcmd printf '"\e]2;$PWD\a"'

No embedded control characters or backquoted pwd command.
     
himself
Mac Elite
Join Date: Jan 2002
Location: Live at the BBQ
Status: Offline
Reply With Quote
Mar 27, 2002, 11:34 PM
 
*sniffsniff*
&lt;moved to tears&gt; isn't community grand? &lt;/moved to tears&gt;

I never knew you could do this stuff... and it's so much fun!
"Bill Gates can't guarantee Windows... how can you guarantee my safety?"
-John Crichton
     
Oneota
Professional Poster
Join Date: May 2000
Location: Urbandale, IA
Status: Offline
Reply With Quote
Mar 28, 2002, 02:44 AM
 
Hehehe....all these Mac users who, for years, snickered at the Windows users and their dumb 'ol command line...hehehe

Of course, the Unix command line kicks all kindsa booty compared to DOS, but still...the irony is quite amusing.
"Yields a falsehood when preceded by its quotation" yields a falsehood when preceded by its quotation.
     
himself
Mac Elite
Join Date: Jan 2002
Location: Live at the BBQ
Status: Offline
Reply With Quote
Mar 28, 2002, 07:22 PM
 
Originally posted by Oneota:
<STRONG>Hehehe....all these Mac users who, for years, snickered at the Windows users and their dumb 'ol command line...hehehe

Of course, the Unix command line kicks all kindsa booty compared to DOS, but still...the irony is quite amusing. </STRONG>
Granted, but only a small few Mac users will appreciate this and make use of it (but i assume many more will understand how useful it can be).
"Bill Gates can't guarantee Windows... how can you guarantee my safety?"
-John Crichton
     
tinrib
Mac Elite
Join Date: Feb 2001
Location: Bristol, UK, living in Melbourne, Australia
Status: Offline
Reply With Quote
Mar 28, 2002, 09:56 PM
 
can I have the hostname of the computer I am currently logged into (via SSH) in the titlebar? I tried adding $HOSTNAME instead of $PWD but of course once I am logged into another computer it doesn't work! (duh!).

This would be really cool as I often am logged in to 4 or 5 different servers at a time.
     
gorgonzola
Admin Emeritus
Join Date: Nov 2000
Location: New Yawk
Status: Offline
Reply With Quote
Mar 28, 2002, 11:27 PM
 
Moving to X Unix.
"Do not be too positive about things. You may be in error." (C. F. Lawlor, The Mixicologist)
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 09:49 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,