linuxbashpowerline

fonts-powerline apt packge conflict with `$_`


Whenever I run: mkdir smth && cd $_ I get: bash: cd: $'\E(B\E[m': No such file or directory

I'm using a non-login shell:-

mkdir smth && cd $_
# Outputs -> bash: cd: $'\E(B\E[m': No such file or directory
type mkdir
# mkdir is hashed (/usr/bin/mkdir)

here's my config file

if there is anything I haven't included or clarified, please let me know


Solution

  • the problem lies in these 2 lines in the config file

        none="$(tput sgr0)"
        trap 'echo -ne "${none}"' DEBUG
    

    remove them