From 86848b385cd2666632e80aefaa799a776d2c637f Mon Sep 17 00:00:00 2001 From: Tolsee Date: Wed, 15 Jan 2025 02:40:08 +1100 Subject: [PATCH] chore: remove unnecessary eval (#871) * chore: add escape to eval * fix: remove eval --- src/commands/autocomplete/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands/autocomplete/index.ts b/src/commands/autocomplete/index.ts index 0ff3860d..f3ad77ca 100644 --- a/src/commands/autocomplete/index.ts +++ b/src/commands/autocomplete/index.ts @@ -62,17 +62,17 @@ Setup Instructions for ${this.config.bin.toUpperCase()} CLI Autocomplete --- instructions += ` 1) Run this command in your terminal window: - ${cyan(`printf "eval $(${scriptCommand})" >> ~/.bashrc; source ~/.bashrc`)} + ${cyan(`printf "$(${scriptCommand})" >> ~/.bashrc; source ~/.bashrc`)} The previous command adds the ${cyan(setupEnvVar)} environment variable to your Bash config file and then sources the file. ${bold('NOTE')}: If you’ve configured your terminal to start as a login shell, you may need to modify the command so it updates either the ~/.bash_profile or ~/.profile file. For example: - ${cyan(`printf "eval $(${scriptCommand}) >> ~/.bash_profile; source ~/.bash_profile`)} + ${cyan(`printf "$(${scriptCommand}) >> ~/.bash_profile; source ~/.bash_profile`)} Or: - ${cyan(`printf "eval $(${scriptCommand})" >> ~/.profile; source ~/.profile`)} + ${cyan(`printf "$(${scriptCommand})" >> ~/.profile; source ~/.profile`)} 2) Start using autocomplete: @@ -86,7 +86,7 @@ Setup Instructions for ${this.config.bin.toUpperCase()} CLI Autocomplete --- instructions += ` 1) Run this command in your terminal window: - ${cyan(`printf "eval $(${scriptCommand})" >> ~/.zshrc; source ~/.zshrc`)} + ${cyan(`printf "$(${scriptCommand})" >> ~/.zshrc; source ~/.zshrc`)} The previous command adds the ${cyan(setupEnvVar)} environment variable to your zsh config file and then sources the file.