summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-10-21 19:15:21 -0400
committerJesse Luehrs <doy@tozt.net>2013-10-21 19:16:50 -0400
commite787a1f079b832b393627b7df863eff932b3ad4a (patch)
treec5df4abb5db8b319f3890f139aa1cac518969d78
parent81106792e21cca716dc151bebd98e94726957286 (diff)
downloadconf-e787a1f079b832b393627b7df863eff932b3ad4a.tar.gz
conf-e787a1f079b832b393627b7df863eff932b3ad4a.zip
keep 5.8 compat here
-rwxr-xr-xbin/fancy-prompt4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/fancy-prompt b/bin/fancy-prompt
index dedc697..153ba4a 100755
--- a/bin/fancy-prompt
+++ b/bin/fancy-prompt
@@ -13,8 +13,8 @@ if ($ARGV[0] eq '--prompt-escape') {
# collect information
chomp(my $hostname = `hostname`);
my $cols = `tput cols`;
-my $pwd = $ENV{PWD} // '???';
-my $user = $ENV{USER} // '???';
+my $pwd = defined $ENV{PWD} ? $ENV{PWD} : '???';
+my $user = defined $ENV{USER} ? $ENV{USER} : '???';
my $root = ($> == 0);
(my $time = localtime) =~ s/.*(\d\d:\d\d:\d\d).*/$1/;
my $err = $ARGV[0] || 0; # bash's $? is passed on the command line