Setting the current directory path to terminal title


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Setting the current directory path to terminal title
# 1  
Old 03-10-2012
Setting the current directory path to terminal title

In ubuntu, I want to update the title of the terminal window with the current directory path. Any ideas how this can be achieved?

---------- Post updated at 02:22 PM ---------- Previous update was at 02:08 PM ----------

Done it

---------- Post updated at 02:30 PM ---------- Previous update was at 02:22 PM ----------

Code:
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'

# 2  
Old 04-07-2012
I have a problem that when the command is too long, it is written on the same line rather than continuing on the following line.
# 3  
Old 04-08-2012
Post withdrawn. I do not understand the thread at all.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to get the current directory Path?

How to get the current directory Path in your prompt? i am getting a $ mark only in my prompt? Please help me with this (3 Replies)
Discussion started by: Abhishek0683
3 Replies

2. Shell Programming and Scripting

How to list all the files, directories and sub-directories in the current path except one directory?

Can anyone come up with a unix command that lists all the files, directories and sub-directories in the current directory except a folder called log.? Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies

3. Shell Programming and Scripting

How to change the title bar of the terminal screen

Hi, How to change the value after the symbol '@' ? $ i.e. @mac1 I want to change it to @prod2 Also need to change the same in the title bar on the top when we open a new terminal. (3 Replies)
Discussion started by: milink
3 Replies

4. Shell Programming and Scripting

"find . -printf" without prepended "." path? Getting path to current working directory?

If I enter (simplified): find . -printf "%p\n" then all files in the output are prepended by a "." like ./local/share/test23.log How can achieve that a.) the leading "./" is omitted and/or b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Discussion started by: pstein
1 Replies

5. Shell Programming and Scripting

Directory name in terminal title

I would like to have the directory I am currently in being shown in the title when I open a terminal window in Fedora (selecting "Open in terminal" or using the Terminal from the panel). Any way that I can do this? Basically whenever I do "cd", the title should update I have created this... (1 Reply)
Discussion started by: kristinu
1 Replies

6. OS X (Apple)

How to make a new terminal tab open in the same directory the current one?

I want to press "apple + T" to open a new terminal tab. This terminal tab must be in the same directory as the current one. Anyone knows how to do that? Thanks a lot! (1 Reply)
Discussion started by: andrewust
1 Replies

7. Shell Programming and Scripting

Setting path for a stand alone library in home directory

Hi all, This is probably a basic question. I had installed a stand-alone library called szip in my home directory, as I don't have the necessary root permission. I tried to set an environment for both include and lib files in my .cshrc script as setenv /home/szip/lib setenv... (3 Replies)
Discussion started by: alamcheril
3 Replies

8. Shell Programming and Scripting

want the current directory without the absolute path

Hi guys I'm trying to move an empty directory to the $TRASH directory. Say the directory i have is ./hello/hello1/hello2 and i'm in hello2, and i want hello2 moved. this code: TRASH=$home/deleted find "$TRASH/$1" -type d -exec rmdir { } \; 2>/dev/null mv -f $1 $TRASH 2>/dev/null works... (2 Replies)
Discussion started by: olimiles
2 Replies

9. Solaris

Change Terminal Title

Is it possible to change the title of a Terminal window on Solaris? For example, for a MS Windows command window, one can simply type "title NameofWindow" to change the title for a command window. I was looking for similar functionality for terminal windows. Thanks. (8 Replies)
Discussion started by: here2learn
8 Replies

10. UNIX for Dummies Questions & Answers

Question about Restricting Search path of FIND to current directory

Hi, By default FIND command searches for matching files in all the subdirectories within the specified path. Is there a way to restrict FIND command's search path to only the specified directory and NOT TO scan its subdirectories. Any help would be more than appreciated. Thanks and Regards (2 Replies)
Discussion started by: super_duper_guy
2 Replies
Login or Register to Ask a Question