Only replace username when preceded by a space
This commit is contained in:
@@ -96,7 +96,7 @@ if [ -e $HOME/.user_sym ]; then
|
||||
function rejustify_ls_columns(){
|
||||
ruby -e "o=STDIN.read;re=/^(([^ ]* +){2})(([^ ]* +){3})/;u,g,s=o.lines.map{|l|l[re,3]}.compact.map(&:split).transpose.map{|a|a.map(&:size).max+1};puts o.lines.map{|l|l.sub(re){|m|\"%s%-#{u}s %-#{g}s%#{s}s \"%[\$1,*\$3.split]}}"
|
||||
}
|
||||
_ls_processor="| sed \"s/$USER/\$(/bin/cat $HOME/.user_sym)/g\" | rejustify_ls_columns"
|
||||
_ls_processor="| sed \"s/ $USER/ \$(/bin/cat $HOME/.user_sym)/g\" | rejustify_ls_columns"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user