Skip to content

Commit

Permalink
Fix auto completion script's condition for updating bashrc file
Browse files Browse the repository at this point in the history
  • Loading branch information
nimrod-teich committed Dec 30, 2023
1 parent da82ac1 commit 3f531bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/lavad_auto_completion_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ case $terminal_type in
bashrc_file="$HOME/.bash_profile"
fi

if ! grep -q "source $file" $bashrc_file; then
if ! grep -q "source \$file" $bashrc_file; then
echo >> $bashrc_file
echo "if [ -d $comp_dir ]; then" >> $bashrc_file
echo " for file in $comp_dir/*; do" >> $bashrc_file
Expand All @@ -66,7 +66,7 @@ case $terminal_type in
bashrc_file="$HOME/.bash_profile"
fi

if ! grep -q "source $file" $bashrc_file; then
if ! grep -q "source \$file" $bashrc_file; then
echo >> $bashrc_file
echo "if [ -d $comp_dir ]; then" >> $bashrc_file
echo " for file in $comp_dir/*; do" >> $bashrc_file
Expand Down

0 comments on commit 3f531bb

Please sign in to comment.