VKontakte.DJ
forum traveling
 

Celestial Software

...better by design

Home Support SSH Client Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Current Path in Windows Panel (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: Current Path in Windows Panel
#567
Current Path in Windows Panel 18 Years, 9 Months ago  
Is there a way to show the current path (pwd output) in the Windows Panel where you display the "tnt" file name and Absolute Telnet version?
webaran (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
35
 
The administrator has disabled public write access.  
#568
Re: Current Path in Windows Panel 18 Years, 9 Months ago  
If you're using the BASH shell, you can use the 'PROMPT_COMMAND' variable to do it.

Mine is:

Code:

  PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}07"'
The 33]0; begins a sequence that passes the remainder of the string to the window title bar. The 07 terminates the sequence. The stuff in the middle displays the username, hostname, and current working directory.

If you're using RedHat Linux, just switch your terminal type to 'xterm' (logout and login) and RedHat will set this automatically.

There may be other ways to do this with other systems/shells. The key is to find a mechanism that fires at every prompt, so it can follow you as you change directories.

Brian
bpence (Admin)
Admin
Posts: 1404
graph
User Offline Click here to see the profile of this user
Logged Logged  
 
Brian Pence
Celestial Software
SSH , SFTP, and Telnet in a tabbed interface for Windows XP, Vista, Mobile, and others
 
The administrator has disabled public write access.  
#569
Re: Current Path in Windows Panel 18 Years, 9 Months ago  
Here's a good article that includes examples for different shells:

click here

Brian
bpence (Admin)
Admin
Posts: 1404
graph
User Offline Click here to see the profile of this user
Logged Logged  
 
Brian Pence
Celestial Software
SSH , SFTP, and Telnet in a tabbed interface for Windows XP, Vista, Mobile, and others
 
The administrator has disabled public write access.  
Go to top