From 9ccac9f1797f62b4a3574f16b7d0316b221dcef6 Mon Sep 17 00:00:00 2001 From: Practicalli Johnny <250870+practicalli-johnny@users.noreply.github.com> Date: Wed, 6 Dec 2023 09:53:57 +0000 Subject: [PATCH] install: astro alias for bash and zsh Hint suggesting the use of a common aliases file when switching between aliases Signed-off-by: Practicalli Johnny <250870+practicalli-johnny@users.noreply.github.com> --- docs/configuration/astronvim/index.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/configuration/astronvim/index.md b/docs/configuration/astronvim/index.md index 86cd0ba2..2a626551 100644 --- a/docs/configuration/astronvim/index.md +++ b/docs/configuration/astronvim/index.md @@ -69,12 +69,27 @@ AstroNvim provides a [:fontawesome-brands-github: template repository](https://g Create a shell alias that sets `NVIM_APPNAME` to the location of the AstroNvim community config -Add alias to `.bashrc` for Bash shell or `.zshenv` for Zsh +Add alias to `.bashrc` for Bash shell or `.zshrc` for Zsh ```config alias astro="NVIM_APPNAME=astronvim nvim" ``` +!!! HINT "dot aliases file for both bash and zsh" + Create a `.config/aliases` file containing all shell aliases when often switching between different shells, avoiding the need to define aliases twice + + Source the `.config/aliases` file from within `.bashrc` and `.zshrc` + + ```shell title=".bashrc" + if [ -f ~/.config/aliases ]; then + . ~/.config/aliases + fi + ``` + + ```shell title=".zshrc" + source $HOME/.config/aliases + ``` + [:fontawesome-solid-book-open: Configure shell alias](/neovim/configuration/){target=_blank .md-button}