File: bash_autocomplete_setup.sh

package info (click to toggle)
frogatto-data 1.3.1%2Bdfsg-4
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 254,428 kB
  • sloc: xml: 584; python: 396; perl: 249; sh: 126; ruby: 69; makefile: 21
file content (22 lines) | stat: -rwxr-xr-x 612 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#To run: ". bash_autocomplete.sh". The period and space is very, very important. ./ won't work.

set -e
set -u

if [ -f "bash_autocomplete.sh" ];
then
	relative_file="bash_autocomplete.sh"
else
	if [ -f "utils/bash_autocomplete.sh" ];
	then
		relative_file="utils/bash_autocomplete.sh"
	else
	   echo -e "\e[00;31mError:\e[00m Failed to find bash_autocomplete.sh. (You may need to navigate to the folder it's in.)"
	   exit 1
	fi
fi

. ${relative_file}
sudo rm -f /etc/bash_completion.d/frogatto
sudo ln ${relative_file} /etc/bash_completion.d/frogatto
echo -e "\e[00;32mSuccess:\e[00m Tab completion installed."