Forum

Current Path in Win...
 
Notifications
Clear all

Current Path in Windows Panel

0 Posts
2 Users
0 Reactions
201 Views
(@webaran)
New Member
Joined: 20 years ago
Posts: 1
Topic starter  

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?


   
ReplyQuote
(@bpence)
Member Admin
Joined: 12 months ago
Posts: 1375
 

If you're using the BASH shell, you can use the 'PROMPT_COMMAND' variable to do it.

Mine is:

  PROMPT_COMMAND='echo -ne "\\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\\007"'

The \\033]0; begins a sequence that passes the remainder of the string to the window title bar. The \\007 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


   
ReplyQuote
(@bpence)
Member Admin
Joined: 12 months ago
Posts: 1375
 

Here's a good article that includes examples for different shells:

<broken link removed>

Brian

This post was modified 5 months ago by bpence

   
ReplyQuote
Share: