Ask coding questions

← Back to all posts
How to have .bashrc file (for bash aliases) read on starting replit?
PascalBernhard

I set some programs for training purposes. They are invoked via bash scripts. To make it easier for trainees I want to set up some aliases for bash, so they only have to type a shortcut.

A file .bashrc is not read automatically when one opens a replit, it works when sourced manually. I found the hint to create a file .replit but so far a solution on what to put there to have .bashrc sourced at startup or setting up shell aliases directly in .replit eludes me. Thanks in advance for your ideas

Voters
PascalBernhard
Comments
hotnewtop
Coder100
  1. the .replit file merely configures what happens when you run the repl.

https://docs.replit.com/programming-ide/configuring-run-button#configuring-the-run-button

PascalBernhard

@Coder100

Thanks very much

In the documentation I see the option onBoot

doesn't work though, but now I already have a better idea on how to explore this issue further

Coder100

you could use the run part, onBoot is probably really buggy it never works for me @PascalBernhard