Results 1 to 5 of 5

Thread: display directory in terminal tab

  1. #1
    Join Date
    Jul 2008
    Beans
    233
    Distro
    Ubuntu 16.04 Xenial Xerus

    display directory in terminal tab

    Trying enable the display of current directory at top of terminal in each open tab. Something like:

    ~/Documents

    Have installed xtitle package. At command line:

    > xtitle Test

    works. I've seen some post which talk about placing commands in .bashrc. I use tcsh, so thinking .cshrc. What is the setting to get directory to show each time I change directory or open a new tab?
    Lenovo T440p | Trusty Tahr
    Dell Studio XPS 1645 | Intel Core i7 1.73GHz | Xenial Xerus

  2. #2
    Join Date
    Oct 2011
    Location
    ZZ9 Plural Z Alpha
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: display directory in terminal tab

    This might be of help.

  3. #3
    Join Date
    Jul 2008
    Beans
    233
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: display directory in terminal tab

    Quote Originally Posted by cortman View Post
    This might be of help.
    Looks like the simple way is to edit the default profile.

    Terminal -> Edit -> Title and Command

    in the Initial Tile field. A colleague who uses another window system just had success by placing "%D" in that field. That doesn't work for GNOME. Still looking, as I'm unable to translate the bash commands in that tutorial into tcsh style.
    Lenovo T440p | Trusty Tahr
    Dell Studio XPS 1645 | Intel Core i7 1.73GHz | Xenial Xerus

  4. #4
    Join Date
    Oct 2011
    Location
    ZZ9 Plural Z Alpha
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: display directory in terminal tab

    Well, here's a post on doing it with tcsh- I dont' use tcsh so I can't say if it'll work or not- it's for OSX...

  5. #5
    Join Date
    Jul 2008
    Beans
    233
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: display directory in terminal tab

    I chopped out the echo and sed commands from

    alias cwdcmd 'printf "\033]1;%s\007\033]2;%s\007" "$cwd:t" "$HOST echo $cwd | sed s-$HOME-~-" '

    and placed in .cshrc. When I do a cd command I'm getting the computer name. Want something like:

    ~/Documents

    which is /home/smith/Documents
    Last edited by rawlins02; March 23rd, 2013 at 10:44 PM.
    Lenovo T440p | Trusty Tahr
    Dell Studio XPS 1645 | Intel Core i7 1.73GHz | Xenial Xerus

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •