diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-03-19 00:46:09 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-03-19 00:46:09 -0400 |
commit | cee1f02b0a18c7f755c5d82eaa8fca45f7310cbd (patch) | |
tree | 969fef0308633740200fecc17efb9d3aec17d6a5 /bin | |
parent | 9b7d36968c558301a76664d3162aee5250e3fc68 (diff) | |
download | conf-cee1f02b0a18c7f755c5d82eaa8fca45f7310cbd.tar.gz conf-cee1f02b0a18c7f755c5d82eaa8fca45f7310cbd.zip |
remove some dead code
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fancy-prompt | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/bin/fancy-prompt b/bin/fancy-prompt index 2a14153..148cb05 100755 --- a/bin/fancy-prompt +++ b/bin/fancy-prompt @@ -20,8 +20,6 @@ my $root = ($> == 0); my $err = $ARGV[0] || 0; # bash's $? is passed on the command line my $battery = battery(); my $charging = charging(); -my $in_tmux = exists $ENV{TMUX}; -my $in_ssh = exists $ENV{SSH_CONNECTION}; my $vcs = vcs(); my $vcsmodified = ($vcs =~ /:[+-]/) || do { (my $v = $vcs) =~ s/:.*//; $v =~ /\W$/ }; @@ -132,13 +130,6 @@ my $prompt = $root ? '#' : '$'; my $meter_length = 10; my $maxvcslen = 20; # at least 17 -# snippets -my $nested = ''; -# not sure how useful this really is, let's leave it off for now -# if ($in_tmux || $in_ssh) { -# $nested = '(' . ($in_tmux ? 'T' : '') . ($in_ssh ? 'S' : '') . ')'; -# } - # build the pieces of the prompt my $timestr = wrap($time, '[]', color('time')); @@ -165,7 +156,7 @@ my $maxpathlen = $cols - 1 - $meter_length - 2 - 1 - - length($user) - length($hostname) - length($nested) - 1 + - length($user) - length($hostname) - 1 - 1 - length($time) - 2 - 1; @@ -179,8 +170,7 @@ my $pathstr = wrap($path_info, '()', color('path')) my $locstr = color('user') . $user . color('background') . '@' - . color('hostname') . $hostname - . color('background') . $nested; + . color('hostname') . $hostname; # assemble the prompt print join(' ', '', $pathstr, $battstr, $locstr, $timestr, ''); |