#(duplicate) not reading bash aliases

9 messages · Page 1 of 1 (latest)

gentle barn
#

top windows are xfce4-terminal emulator windows showing some custom aliases written to .bash_aliases and implementation of one such alias in the other window. Bottom window shows how warp doesn't recognise the custom alias.

went to settings and selected bash under features tab, instead of the default option. but to no avail.

polar belfryBOT
#

Hi @gentle barn. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

There could be a few reasons why your bash aliases are not working in Warp:

  1. Alias Expansion: Warp has a feature called "Alias Expansion" which can be toggled on and off. If this feature is enabled, it might be causing issues with your aliases. You can check this setting by navigating to Settings > Features > Editor and toggling “Expand aliases as you type”. Alternatively, you can press CMD-P to open the Command Palette, search for the “Enable/disable alias expansion” option and hit ENTER[^1^][^7^].

  2. Incompatible Tools: Warp might not be able to parse certain custom prompts, themes, or plugins. If you're using any such tools, they might be interfering with your aliases. You can check the list of incompatible tools here (https://docs.warp.dev/help/known-issues#list-of-incompatible-tools)[^1^][^2^].

  3. Custom Functions: If your aliases are defined as custom functions, please note that Warp currently supports completions for aliases but not for functions[^1^][^2^].

  4. Shell Setting: Make sure that your default shell in Warp is set to bash. You can check this by navigating to Settings > Features > Session > Startup shell for new sessions[^3^].

If none of the above solutions work, it might be helpful to isolate the issue by setting up clean configs or disabling parts of your dotfiles just for Warp. You can do this by running the following command:

echo 'BASH_ENV=/' > ~/.bashrc

This forces bash to run with zero configs. You can also use the following conditional statement to disable parts of your dotfiles just for Warp:

if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
  > What you want to disable here <
fi

If the problem persists, I recommend reaching out to the Warp support team or checking their documentation for more detailed troubleshooting steps[^3^][^4^][^5^][^6^].

#

Sources:
^1^]: [Discord support thread: .bash_aliases > Answers (https://discord.com/channels/851854972600451112/1211080586765279262)
^2^]: [Discord support thread: .bash_aliases > Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: (https://discord.com/channels/851854972600451112/1211080586765279262)
^3^]: [Discord support thread: .bash_aliases > Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: Part 2 (https://discord.com/channels/851854972600451112/1211080586765279262)
^4^]: [Discord support thread: .bash_aliases > Original post (https://discord.com/channels/851854972600451112/1211080586765279262)
^5^]: [Discord support thread: .bash_aliases > Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: Part 1 (https://discord.com/channels/851854972600451112/1211080586765279262)
^6^]: [Github Issue (closed): Warp not respecting default shell > Comments Part 1 (https://github.com/warpdotdev/Warp/issues/1833)
^7^]: [Github Issue (closed): bash alias replace entered command > Comments (https://github.com/warpdotdev/Warp/issues/3836)

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@gentle barn kapa.ai is still learning and improving, please let us know how it did by reacting below

gentle barn
#

(duplicate) not reading bash aliases

versed tulip
#

Did you reload your sessions after adding the new alias/aliases?

#

see me Cool aliases post in #1252744081411670086 for others but here is how I reload my session after changes:

exec ${SHELL} -l

I added this alias to make it easier:

alias reload="exec ${SHELL} -l"
gentle barn
#

Hey @versed tulip, thanks for the reply. I added the tag [duplicate] because I found someone else had the same issue [which didn't show when I was searching for the issues - discord glitch/my internet took a hit]. it all worked out after I removed the .bash_profile file which had just one line to include one custom dir added to path; which I added on the original .bashrc file. and it's all fine now.

Do I have to reload even if those aliases were added [through .bash_aliases] quite a while ago [before I got warp that is]?