aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2013-10-25 18:28:17 +0200
committerUlrich Müller <ulm@gentoo.org>2013-10-25 18:28:17 +0200
commita530e411f0cc50cf9598985fb03cf40ff85c69d7 (patch)
tree2f9e32850ecc9e8120d4c840c84aee245e805575 /bin
parentRearrange variables. (diff)
downloadeselect-a530e411f0cc50cf9598985fb03cf40ff85c69d7.tar.gz
eselect-a530e411f0cc50cf9598985fb03cf40ff85c69d7.tar.bz2
eselect-a530e411f0cc50cf9598985fb03cf40ff85c69d7.zip
Function 'colours' accepts an argument. Remove 'nocolours'.
* libs/output.bash.in (colours): Accept an argument and handle both enabling and disabling of colour output. (nocolours): Remove function. * bin/eselect.in: Call 'colours' with appropriate argument.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/eselect.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/eselect.in b/bin/eselect.in
index fd570df..b3b7c9e 100755
--- a/bin/eselect.in
+++ b/bin/eselect.in
@@ -159,10 +159,10 @@ fi
# enable colour output and get width of terminal iff stdout is a tty
if [[ -t 1 ]]; then
- if [[ ${colour} = no ]]; then nocolours; else colours; fi
+ colours ${colour:-yes}
init_columns
else
- if [[ ${colour} = yes ]]; then colours; else nocolours; fi
+ colours ${colour:-no}
fi
unset colour