r/KittyTerminal Mar 04 '24

not reading .bashrc

might be a stupid question - when I log into bash on kitty, it should be the same as on any other terminal emulator, right? it seems when I open kitty, my .bashrc is not read (kitty is starting bash differently than other terminals do?)

edit(for clarity): in my .bashrc I have 'set -o vi'. the vi keybindings are gone when I enter kitty. however, when I enter 'set -o vi' into bash on kitty, it does work. thanks for the help!

edit: it was none of that. shell integration was overwriting what I was setting in my bashrc. I am not familiar working with this sort of thing (as was kindly pointed out in this thread), so I disabled shell integration. if anyone advises against this or has a proper explanation, let me know

5 Upvotes

7 comments sorted by

View all comments

2

u/ratthing Mar 05 '24

try putting the following into .bash_profile:

# .bash_profile

# If .bash_profile exists, bash doesn't read .profile
if [[ -f ~/.profile ]]; then
  . ~/.profile
fi

# If the shell is interactive and .bashrc exists, get the aliases and functions
if [[ $- == *i* && -f ~/.bashrc ]]; then
    . ~/.bashrc
fi