tabby icon indicating copy to clipboard operation
tabby copied to clipboard

Use "Shell working directory reporting" solution, my color scehmes lose efficacy

Open saber-hyw opened this issue 1 year ago • 2 comments

Describe the problem: color scehmes lose efficacy,when use "export PS1="$PS1[\e]1337;CurrentDir="'$(pwd)\a]'" in ~/.bash_profile

To Reproduce: [Steps to reproduce the behavior]

saber-hyw avatar May 24 '24 03:05 saber-hyw

I just had the same problem and was able to resolve it.

  1. do you have a ~/.profile file?

  2. if so, does it contain something like the following?

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
  1. if the answer ist "yes" to both of those questions I think this might be intended behaviour. Because you created the ~/.bash_profile file, bash will not read the ~/.profile file and therefore will not include your ~/.bashrc where all the colors are set. If you want your colors to work then put the line export PS1="$PS1\[\e]1337;CurrentDir="'$(pwd)\a\]' into your ~/.profile file.

I hope this helps!

MRZ0123 avatar Jul 17 '24 14:07 MRZ0123

put the line export PS1="$PS1\[\e]1337;CurrentDir="'$(pwd)\a\]' into your ~/.profile file.

It works for me! Thank you so much!

sgpublic avatar Jul 18 '24 06:07 sgpublic