Coding style
- Moved path_colored into lscolors. - Made lscolors a package. - Moved LS_COLORS.sh and LSCOLORS into lscolors. - Moved fill3.join into termstr so that lscolors can depend on termstr only.
This commit is contained in:
parent
fe42fd36d4
commit
388c59aefd
13 changed files with 85 additions and 70 deletions
|
|
@ -177,6 +177,15 @@ def _pad_wide_chars(str_):
|
|||
return str_ if len(padded_str) == len(str_) else padded_str
|
||||
|
||||
|
||||
def join(seperator, parts):
|
||||
if parts == []:
|
||||
return ""
|
||||
try:
|
||||
return seperator.join(parts)
|
||||
except TypeError:
|
||||
return TermStr(seperator).join(parts)
|
||||
|
||||
|
||||
class TermStr(collections.UserString):
|
||||
|
||||
def __init__(self, data, style=CharStyle()):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue