aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorAdam Hovorka <[email protected]>2020-05-20 15:46:54 -0600
committerAdam Hovorka <[email protected]>2020-05-20 15:46:54 -0600
commit86fbbd84cf3e0321d75239fa31a80265ffbc8b18 (patch)
treebfa1ffc237f7a779a829c15ad474d230ffd79eb5 /base
parentdd31e008c9a55e53c4a2ccc3cf4ca5c83dd2ef5a (diff)
Update k.zsh and add custom ls colors
Diffstat (limited to 'base')
-rw-r--r--base/zsh/LS_COLORS799
-rw-r--r--base/zsh/k.zsh396
-rw-r--r--base/zsh/lscolors.zsh3
3 files changed, 1038 insertions, 160 deletions
diff --git a/base/zsh/LS_COLORS b/base/zsh/LS_COLORS
new file mode 100644
index 0000000..a5e970d
--- /dev/null
+++ b/base/zsh/LS_COLORS
@@ -0,0 +1,799 @@
+# dircolors LS_COLORS >lscolors.zsh
+# vim: set ft=dircolors, set fdm=marker
+
+# core {{{1
+BLK 33;1
+CAPABILITY 31;1;7
+CHR 33;1
+DIR 34;1
+DOOR 35;1
+EXEC 32;1
+FIFO 33
+FILE 0
+LINK target
+MISSING 31;1;7
+MULTIHARDLINK 33;1
+NORMAL 0
+ORPHAN 31;1;7
+OTHER_WRITABLE 32;1;7
+SETGID 33;1;7
+SETUID 42;1
+SOCK 35;1
+STICKY 44;1
+STICKY_OTHER_WRITABLE 36;1;7
+# }}}
+# documents {{{1
+*README 38;5;16
+*README.rst 38;5;16
+*README.md 38;5;16
+*LICENSE 38;5;16
+*COPYING 38;5;16
+*INSTALL 38;5;16
+*COPYRIGHT 38;5;16
+*AUTHORS 38;5;16
+*HISTORY 38;5;16
+*CONTRIBUTORS 38;5;16
+*PATENTS 38;5;16
+*VERSION 38;5;16
+*NOTICE 38;5;16
+*CHANGES 38;5;16
+.log 38;5;16
+# plain-text {{{2
+.txt 0
+# markup {{{2
+.etx 38;5;16
+.info 38;5;16
+.markdown 38;5;16
+.md 38;5;16
+.mkd 38;5;16
+.nfo 38;5;16
+.pod 38;5;16
+.rst 38;5;16
+.tex 38;5;16
+.textile 38;5;16
+# key-value, non-relational data {{{2
+.bib 33
+.json 33
+.jsonl 33
+.ndjson 33
+.msg 33
+.pgn 33
+.rss 33
+.xml 33
+.fxml 33
+.toml 33
+.yaml 33
+.yml 33
+.RData 33
+.rdata 33
+.xsd 33
+.dtd 33
+.sgml 33
+.rng 33
+.rnc 33
+# }}}
+# binary {{{2
+.cbr 35
+.cbz 35
+.chm 35
+.djvu 35
+.pdf 35
+.PDF 35
+.mobi 35
+.epub 35
+# words {{{3
+.docm 35;4
+.doc 35
+.docx 35
+.odb 35
+.odt 35
+.rtf 35
+# presentation {{{3
+.odp 38;5;16;1
+.pps 38;5;16;1
+.ppt 38;5;16;1
+.pptx 38;5;16;1
+# Powerpoint show
+.ppts 38;5;16;1
+# Powerpoint with enabled macros
+.pptxm 38;5;16;1;4
+# Powerpoint show with enabled macros
+.pptsm 38;5;16;1;4
+# spreadsheet {{{3
+.csv 32
+.tsv 32
+# Open document spreadsheet
+.ods 32
+.xla 32
+# Excel spreadsheet
+.xls 32
+.xlsx 32
+# Excel spreadsheet with macros
+.xlsxm 32;4
+# Excel module
+.xltm 32;4
+.xltx 32
+# }}}
+# }}}
+# configs {{{2
+*config 1
+*cfg 1
+*conf 1
+*rc 1
+*authorized_keys 1
+*known_hosts 1
+.ini 1
+.plist 1
+# vim
+.viminfo 1
+# cisco VPN client configuration
+.pcf 1
+# adobe photoshop proof settings file
+.psf 1
+# Sublime Text config
+.hidden-color-scheme 1
+.hidden-tmTheme 1
+.last-run 1
+.merged-ca-bundle 1
+.sublime-build 1
+.sublime-commands 1
+.sublime-keymap 1
+.sublime-settings 1
+.sublime-snippet 1
+.sublime-project 1
+.sublime-workspace 1
+.tmTheme 1
+.user-ca-bundle 1
+# eclipse
+.epf 1
+# }}}
+# }}}
+# code {{{1
+# version control {{{2
+.git 35
+.gitignore 38;5;8
+.gitattributes 38;5;8
+.gitmodules 38;5;8
+
+# shell {{{2
+.awk 32;1
+.bash 32;1
+.bat 32;1
+.BAT 32;1
+.sed 32;1
+.sh 32;1
+.zsh 32;1
+.vim 32;1
+
+# interpreted {{{2
+.ahk 38;5;71
+# python
+.py 38;5;71
+.ipynb 38;5;71
+# ruby
+.rb 38;5;71
+.gemspec 38;5;71
+# perl
+.pl 36
+.PL 36
+.t 36
+# sql
+.msql 33
+.mysql 33
+.pgsql 33
+.sql 33
+# Tool Command Language
+.tcl 38;5;71
+# R language
+.r 36
+.R 36
+# Clojure
+.clj 38;5;71
+.cljs 38;5;71
+.cljc 38;5;71
+# Clojure gorilla REPL worksheet
+.cljw 38;5;71
+# Scala
+.scala 38;5;71
+# Dart
+.dart 36
+
+# compiled {{{2
+#
+# assembly language
+.asm 34
+# LISP
+.cl 34
+.lisp 34
+.rkt 34
+# lua
+.lua 34
+# Moonscript
+.moon 34
+# C
+.c 34
+.C 34
+.h 34
+.H 34
+.tcc 34
+# C++
+.c++ 34
+.h++ 34
+.hpp 34
+.hxx 34
+.ii 34
+# method file for Objective C
+.M 34
+.m 34
+# Csharp
+.cc 34
+.cs 34
+.cp 34
+.cpp 34
+.cxx 34
+# Crystal
+.cr 34
+# Google golang
+.go 34
+# fortran
+.f 34
+.F 34
+.for 34
+.ftn 34
+.f90 34
+.F90 34
+.f95 34
+.F95 34
+.f03 34
+.F03 34
+.f08 34
+.F08 34
+# Nim
+.nim 34
+.nimble 34
+# pascal
+.s 34
+.S 34
+# Rust
+.rs 34
+# AppleScript
+.scpt 35
+# Swift
+.swift 35
+# ?
+.sx 34
+# Vala
+.vala 34
+.vapi 34
+# interface file in GHC - https://github.com/trapd00r/LS_COLORS/pull/9
+.hi 34
+# haskell
+.hs 34
+.lhs 34
+# agda
+.agda 34
+.lagda 34
+.lagda.tex 34
+.lagda.rst 34
+.lagda.md 34
+.agdai 34
+# Zig
+.zig 34
+
+# binaries {{{2
+# compiled apps for interpreted languages
+.pyc 38;5;8
+# }}}
+# orchestration {{{2
+.tf 35
+.tfstate 35
+.tfvars 35
+# orchestration 2}}}
+# html {{{2
+.css 38;5;16
+.less 38;5;16
+.sass 38;5;16
+.scss 38;5;16
+.htm 38;5;16
+.html 38;5;16
+.jhtm 38;5;16
+.mht 38;5;16
+.eml 38;5;16
+.mustache 38;5;16
+# }}}
+# java {{{2
+.coffee 34
+.java 34
+.js 34
+.mjs 34
+.jsm 34
+.jsp 34
+# }}}
+# php {{{2
+.php 34
+# CakePHP view scripts and helpers
+.ctp 34
+# Twig template engine
+.twig 34
+# }}}
+# vb/a {{{2
+.vb 34
+.vba 34
+.vbs 34
+# 2}}}
+# Build stuff {{{2
+*Dockerfile 38;5;71
+.dockerignore 38;5;8
+*Makefile 38;5;71
+*MANIFEST 38;5;8
+*pm_to_blib 38;5;8
+# Functional Configuration
+.nix 38;5;71
+.dhall 38;5;16
+# ruby rake
+.rake 38;5;71
+# automake
+.am 38;5;8
+.in 38;5;8
+.hin 38;5;8
+.scan 38;5;8
+.m4 38;5;8
+.old 38;5;8
+.out 38;5;8
+.SKIP 38;5;8
+# }}}
+# patch files {{{2
+.diff 38;5;17
+.patch 38;5;17
+#}}}
+# graphics {{{1
+.bmp 35
+.dicom 35
+.tiff 35
+.tif 35
+.TIFF 35
+.cdr 35
+.flif 35
+.gif 35
+.icns 35
+.ico 35
+.jpeg 35
+.JPG 35
+.jpg 35
+.nth 35
+.png 35
+.psd 35
+.pxd 35
+.pxm 35
+.xpm 35
+.webp 35
+# }}}
+# vector {{{1
+.ai 35
+.eps 35
+.epsf 35
+.drw 35
+.ps 35
+.svg 35
+# }}}
+# video {{{1
+.avi 35
+.divx 35
+.IFO 35
+.m2v 35
+.m4v 35
+.mkv 35
+.MOV 35
+.mov 35
+.mp4 35
+.mpeg 35
+.mpg 35
+.ogm 35
+.rmvb 35
+.sample 35
+.wmv 35
+ # mobile/streaming {{{2
+.3g2 35
+.3gp 35
+.gp3 35
+.webm 35
+.gp4 35
+.asf 35
+.flv 35
+.ts 35
+.ogv 35
+.f4v 35
+ # }}}
+ # lossless {{{2
+.VOB 35
+.vob 35
+# }}}
+# subtitles {{{1
+.ass 33
+.srt 33
+.ssa 33
+.sub 33
+.sup 33 # bitmap image track
+.vtt 33
+#}}}
+# audio {{{1
+.3ga 36
+.S3M 36
+.aac 36
+.amr 36
+.au 36
+.caf 36
+.dat 36
+.dts 36
+.fcm 36
+.m4a 36
+.mid 36
+.mod 36
+.mp3 36
+.mp4a 36
+.oga 36
+.ogg 36
+.opus 36
+.s3m 36
+.sid 36
+.wma 36
+# lossless
+.ape 36
+.aiff 36
+.cda 36
+.flac 36
+.alac 36
+.midi 36
+.pcm 36
+.wav 36
+.wv 36
+.wvc 36
+
+# }}}
+# fonts {{{1
+.afm 34
+.fon 34
+.fnt 34
+.pfb 34
+.pfm 34
+.ttf 34
+.otf 34
+# Web Open Font Format
+.woff 34
+.woff2 34
+# postscript fonts
+.PFA 34
+.pfa 34
+# }}}
+# archives {{{1
+.7z 31
+.a 31
+.arj 31
+.bz2 31
+.cpio 31
+.gz 31
+.lrz 31
+.lz 31
+.lzma 31
+.lzo 31
+.rar 31
+.s7z 31
+.sz 31
+.tar 31
+.tgz 31
+.xz 31
+.z 31
+.zip 31
+.zipx 31
+.zoo 31
+.zpaq 31
+.zst 31
+.zstd 31
+.zz 31
+ # packaged apps {{{2
+.apk 31
+.ipa 31
+.deb 31
+.rpm 31
+.jad 31
+.jar 31
+.cab 31
+.pak 31
+.pk3 31
+.vdf 31
+.vpk 31
+.bsp 31
+.dmg 31
+ # }}}
+ # segments from 0 to three digits after first extension letter {{{2
+.r[0-9]{0,2} 31
+.zx[0-9]{0,2} 31
+.z[0-9]{0,2} 31
+# partial files
+.part 38;5;8
+ # }}}
+# partition images {{{2
+.iso 31
+.bin 31
+.nrg 31
+.qcow 31
+.sparseimage 31
+.toast 31
+.vcd 31
+.vmdk 31
+# }}}
+# databases {{{2
+.accdb 35
+.accde 35
+.accdr 35
+.accdt 35
+.db 35
+.fmp12 35
+.fp7 35
+.localstorage 35
+.mdb 35
+.mde 35
+.sqlite 35
+.typelib 35
+# NetCDF database
+.nc 35
+# }}}
+# tempfiles {{{1
+# undo files
+.pacnew 34;1;7
+.un~ 38;5;8
+.orig 38;5;8
+# backups
+.BUP 38;5;8
+.bak 38;5;8
+.o 38;5;8 # *nix Object file (shared libraries, core dumps etc)
+*core 38;5;8 # Linux user core dump file (from /proc/sys/kernel/core_pattern)
+.mdump 38;5;8 # Mini DuMP crash report
+.rlib 38;5;8 # Static rust library
+.dll 38;5;8 # dynamic linked library
+# temporary files
+.swp 38;5;8
+.swo 38;5;8
+.tmp 38;5;8
+.sassc 38;5;8
+# state files
+.pid 38;5;20
+.state 38;5;20
+*lockfile 38;5;20
+*lock 38;5;20
+# error logs
+.err 31;1
+.error 31;1
+.stderr 31;1
+# state dumps
+.aria2 38;5;8
+.dump 38;5;8
+.stackdump 38;5;8
+.zcompdump 38;5;8
+.zwc 38;5;8
+# tcpdump, network traffic capture
+.pcap 36
+.cap 36
+.dmp 36
+# macOS
+.DS_Store 38;5;8
+.localized 38;5;8
+.CFUserTextEncoding 38;5;8
+# }}}
+# hosts {{{1
+# /etc/hosts.{deny,allow}
+.allow 32
+.deny 31
+# }}}
+# systemd {{{1
+# http://www.freedesktop.org/software/systemd/man/systemd.unit.html
+.service 34
+*@.service 34
+.socket 34
+.swap 34
+.device 34
+.mount 34
+.automount 34
+.target 34
+.path 34
+.timer 34
+.snapshot 34
+# }}}
+# metadata {{{1
+.application 36
+.cue 36
+.description 36
+.directory 36
+.m3u 36
+.m3u8 36
+.md5 36
+.properties 36
+.sfv 36
+.theme 36
+.torrent 36
+.urlview 36
+.webloc 36
+.lnk 36
+# }}}
+# macOS files {{{1
+*CodeResources 38;5;8 # code signing apps
+*PkgInfo 38;5;8 # app bundle id
+.nib 35 # UI
+.car 35 # asset catalog
+.dylib 38;5;8 # shared lib
+# Xcode files {{{2
+.entitlements 38;5;20
+.pbxproj 38;5;20
+.strings 38;5;20
+.storyboard 31
+.xcconfig 38;5;20
+.xcsettings 38;5;20
+.xcuserstate 38;5;20
+.xcworkspacedata 38;5;20
+.xib 38;5;16
+# }}}
+# }}}
+# encrypted data {{{1
+.asc 32
+.bfe 32
+.enc 32
+.gpg 32
+.signature 32
+.sig 32
+.p12 32
+.pem 32
+.pgp 32
+.p7s 32
+*id_dsa 32
+*id_rsa 32
+*id_ecdsa 32
+*id_ed25519 32
+# 1}}}
+# emulators {{{1
+.32x 35
+.cdi 35
+.fm2 35
+.rom 35
+.sav 35
+.st 35
+ # atari
+.a00 35
+.a52 35
+.A64 35
+.a64 35
+.a78 35
+.adf 35
+.atr 35
+ # nintendo
+.gb 35
+.gba 35
+.gbc 35
+.gel 35
+.gg 35
+.ggl 35
+.ipk 35 # Nintendo (DS Packed Images)
+.j64 35
+.nds 35
+.nes 35
+ # Sega
+.sms 35
+# }}}
+# Texas Instruments Calculator files {{{1
+# for more see http://tibasicdev.wikidot.com/file-extensions
+.8xp 35
+.8eu 35
+.82p 35
+.83p 35
+.8xe 35
+# }}}
+# 3D printing {{{1
+.stl 38;5;17
+.dwg 38;5;17
+.ply 38;5;17
+.wrl 38;5;17
+# }}}
+# unsorted {{{1
+#
+# Portable Object Translation for GNU Gettext
+.pot 0
+# CAD files for printed circuit boards
+.pcb 38;5;17
+# groff (rendering app for texinfo)
+.mm 0
+# GIMP files
+.gbr 35
+.scm 35
+.xcf 35
+# printer spool file
+.spl 0
+# RStudio project file
+.Rproj 36
+# Nokia Symbian OS files
+.sis 0
+
+.1p 0
+.3p 0
+.cnc 0
+.def 0
+.ex 0
+.example 0
+.feature 0
+.ger 0
+.ics 0 # calendar information
+.map 0
+.mf 0
+.mfasl 0
+.mi 0
+.mtx 0
+.pc 0
+.pi 0
+.plt 0
+.pm 0
+.rdf 0
+.ru 0
+.sch 0
+.sty 0
+.sug 0
+.tdy 0
+.tfm 0
+.tfnt 0
+.tg 0
+.vcard 0
+.vcf 0 #contact information
+.xln 0
+# AppCode files
+.iml 0
+# }}}
+# termcap {{{1
+TERM ansi
+TERM color-xterm
+TERM con132x25
+TERM con132x30
+TERM con132x43
+TERM con132x60
+TERM con80x25
+TERM con80x28
+TERM con80x30
+TERM con80x43
+TERM con80x50
+TERM con80x60
+TERM cons25
+TERM console
+TERM cygwin
+TERM dtterm
+TERM Eterm
+TERM eterm-color
+TERM gnome
+TERM gnome-256color
+TERM jfbterm
+TERM konsole
+TERM kterm
+TERM linux
+TERM linux-c
+TERM mach-color
+TERM mlterm
+TERM putty
+TERM rxvt
+TERM rxvt-256color
+TERM rxvt-cygwin
+TERM rxvt-cygwin-native
+TERM rxvt-unicode
+TERM rxvt-unicode-256color
+TERM rxvt-unicode256
+TERM screen
+TERM screen-256color
+TERM screen-256color-bce
+TERM screen-bce
+TERM screen-w
+TERM screen.linux
+TERM screen.rxvt
+TERM terminator
+TERM vt100
+TERM xterm
+TERM xterm-16color
+TERM xterm-256color
+TERM xterm-88color
+TERM xterm-color
+TERM xterm-debian
+TERM xterm-kitty
+# }}}
diff --git a/base/zsh/k.zsh b/base/zsh/k.zsh
index fe80c3c..0b2cc5e 100644
--- a/base/zsh/k.zsh
+++ b/base/zsh/k.zsh
@@ -8,53 +8,100 @@ k () {
# Stop stat failing when a directory contains either no files or no hidden files
# Track if we _accidentally_ create a new global variable
- setopt local_options null_glob typeset_silent no_auto_pushd
+ setopt local_options null_glob typeset_silent no_auto_pushd nomarkdirs pushd_silent
+ unsetopt pushd_ignore_dups
# Process options and get files/directories
- typeset -a o_all o_almost_all o_raw o_si o_directory o_no_directory o_no_vcs o_help
- #typeset -a o_all o_almost_all o_human o_si o_directory o_no_directory o_no_vcs o_help
+ typeset -a o_all o_almost_all o_raw o_si o_directory o_mix_directories \
+ o_no_directory o_no_vcs o_sort o_sort_reverse o_help
+ #typeset -a o_all o_almost_all o_human o_si o_directory o_group_directories \
+ # o_no_directory o_no_vcs o_sort o_sort_reverse o_help
zparseopts -E -D \
a=o_all -all=o_all \
A=o_almost_all -almost-all=o_almost_all \
+ c=o_sort \
d=o_directory -directory=o_directory \
- r=o_raw -raw-size=o_raw \
+ -mix-directories=o_mix_directories \
+ b=o_raw -raw-size=o_raw \
-si=o_si \
n=o_no_directory -no-directory=o_no_directory \
-no-vcs=o_no_vcs \
+ r=o_sort_reverse -reverse=o_sort_reverse \
+ -sort:=o_sort \
+ S=o_sort \
+ t=o_sort \
+ u=o_sort \
+ U=o_sort \
-help=o_help
+ #-group-directories-first=o_group_directories \
#h=o_human -human=o_human \
# Print Help if bad usage, or they asked for it
- if [[ $? != 0 || "$o_help" != "" ]]
+ if [[ $? != 0 || -n "$o_help" ]]
then
print -u2 "Usage: k [options] DIR"
print -u2 "Options:"
- print -u2 "\t-a --all list entries starting with ."
- print -u2 "\t-A --almost-all list all except . and .."
- print -u2 "\t-d --directory list only directories"
- print -u2 "\t-n --no-directory do not list directories"
- #print -u2 "\t-h --human show filesizes in human-readable format"
- print -u2 "\t-r --raw-size show filesizes in byte format"
- print -u2 "\t --si with -h, use powers of 1000 not 1024"
- print -u2 "\t --no-vcs do not get VCS status (much faster)"
- print -u2 "\t --help show this help"
+ print -u2 "\t-a --all list entries starting with ."
+ print -u2 "\t-A --almost-all list all except . and .."
+ print -u2 "\t-c sort by ctime (inode change time)"
+ print -u2 "\t-d --directory list only directories"
+ print -u2 "\t-n --no-directory do not list directories"
+ print -u2 "\t --mix-directories do not group directories first"
+ #print -u2 "\t-h --human show filesizes in human-readable format"
+ print -u2 "\t-b --raw-size show filesizes in byte format"
+ print -u2 "\t --si with -h, use powers of 1000 not 1024"
+ print -u2 "\t-r --reverse reverse sort order"
+ print -u2 "\t-S sort by size"
+ print -u2 "\t-t sort by time (modification time)"
+ print -u2 "\t-u sort by atime (use or access time)"
+ print -u2 "\t-U Unsorted"
+ print -u2 "\t --sort WORD sort by WORD: none (U), size (S),"
+ print -u2 "\t time (t), ctime or status (c),"
+ print -u2 "\t atime or access or use (u)"
+ print -u2 "\t --no-vcs do not get VCS status (much faster)"
+ print -u2 "\t --help show this help"
return 1
fi
# Check for conflicts
- if [[ "$o_directory" != "" && "$o_no_directory" != "" ]]; then
+ if [[ -n "$o_directory" && -n "$o_no_directory" ]]; then
print -u2 "$o_directory and $o_no_directory cannot be used together"
return 1
fi
+ # case is like a mnemonic for sort order:
+ # lower-case for standard, upper-case for descending
+ local S_ORD="o" R_ORD="O" SPEC="n" # default: by name
+
+ # translate ls options to glob-qualifiers,
+ # ignoring "--sort" prefix of long-args form
+ case ${o_sort:#--sort} in
+ -U|none) SPEC="N";;
+ -t|time) SPEC="m";;
+ -c|ctime|status) SPEC="c";;
+ -u|atime|access|use) SPEC="a";;
+ # reverse default order for sort by size
+ -S|size) S_ORD="O" R_ORD="o" SPEC="L";;
+ esac
+
+ if [[ -z "$o_sort_reverse" ]]; then
+ typeset SORT_GLOB="${S_ORD}${SPEC}"
+ else
+ typeset SORT_GLOB="${R_ORD}${SPEC}"
+ fi
+ #if [[ -n "$o_group_directories" ]]; then
+ if [[ -z "$o_mix_directories" ]]; then
+ SORT_GLOB="oe:[[ -d \$REPLY ]];REPLY=\$?:$SORT_GLOB"
+ fi
+
# Check which numfmt available (if any), warn user if not available
typeset -i numfmt_available=0
typeset -i gnumfmt_available=0
- #if [[ "$o_human" != "" ]]; then
- if [[ "$o_raw" == "" ]]; then
- if [[ $+commands[numfmt] == 1 ]]; then
+ #if [[ -n "$o_human" ]]; then
+ if [[ -z "$o_raw" ]]; then
+ if (( $+commands[numfmt] )); then
numfmt_available=1
- elif [[ $+commands[gnumfmt] == 1 ]]; then
+ elif (( $+commands[gnumfmt] )); then
gnumfmt_available=1
else
print -u2 "'numfmt' or 'gnumfmt' command not found, human readable output will not work."
@@ -69,32 +116,26 @@ k () {
# Create numfmt local function
numfmt_local () {
- if [[ "$o_si" != "" ]]; then
- if (( $numfmt_available )); then
+ if [[ -n "$o_si" ]]; then
+ if (( numfmt_available )); then
numfmt --to=si $1
- elif (( $gnumfmt_available )); then
+ elif (( gnumfmt_available )); then
gnumfmt --to=si $1
fi
else
- if (( $numfmt_available )); then
+ if (( numfmt_available )); then
numfmt --to=iec $1
- elif (( $gnumfmt_available )); then
+ elif (( gnumfmt_available )); then
gnumfmt --to=iec $1
fi
fi
}
- # Set if we're in a repo or not
- typeset -i INSIDE_WORK_TREE=0
- if [[ $(command git rev-parse --is-inside-work-tree 2>/dev/null) == true ]]; then
- INSIDE_WORK_TREE=1
- fi
-
# Setup array of directories to print
typeset -a base_dirs
typeset base_dir
- if [[ "$@" == "" ]]; then
+ if [[ -z "$@" ]]; then
base_dirs=.
else
base_dirs=($@)
@@ -104,17 +145,18 @@ k () {
# Colors
# ----------------------------------------------------------------------------
# default colors
- K_COLOR_DI="0;34" # di:directory
- K_COLOR_LN="0;35" # ln:symlink
- K_COLOR_SO="0;32" # so:socket
- K_COLOR_PI="0;33" # pi:pipe
- K_COLOR_EX="0;31" # ex:executable
- K_COLOR_BD="34;46" # bd:block special
- K_COLOR_CD="34;43" # cd:character special
- K_COLOR_SU="30;41" # su:executable with setuid bit set
- K_COLOR_SG="30;46" # sg:executable with setgid bit set
+ K_COLOR_DI="01;34" # di:directory
+ K_COLOR_LN="01;36" # ln:symlink
+ K_COLOR_SO="01;35" # so:socket
+ K_COLOR_PI="40;33" # pi:pipe
+ K_COLOR_EX="01;32" # ex:executable
+ K_COLOR_BD="40;33;01" # bd:block special
+ K_COLOR_CD="40;33;01" # cd:character special
+ K_COLOR_SU="37;41" # su:executable with setuid bit set
+ K_COLOR_SG="30;43" # sg:executable with setgid bit set
K_COLOR_TW="30;42" # tw:directory writable to others, with sticky bit
- K_COLOR_OW="30;43" # ow:directory writable to others, without sticky bit
+ K_COLOR_OW="34;42" # ow:directory writable to others, without sticky bit
+ K_COLOR_BR="00;90" # branch
# read colors if osx and $LSCOLORS is defined
if [[ $(uname) == 'Darwin' && -n $LSCOLORS ]]; then
@@ -132,11 +174,6 @@ k () {
K_COLOR_OW=$(_k_bsd_to_ansi $LSCOLORS[21] $LSCOLORS[22])
fi
- # read colors if linux and $LS_COLORS is defined
- # if [[ $(uname) == 'Linux' && -n $LS_COLORS ]]; then
-
- # fi
-
# ----------------------------------------------------------------------------
# Loop over passed directories and files to display
# ----------------------------------------------------------------------------
@@ -145,7 +182,7 @@ k () {
# ----------------------------------------------------------------------------
# Display name if multiple paths were passed
# ----------------------------------------------------------------------------
- if [[ "$#base_dirs" > 1 ]]; then
+ if (( $#base_dirs > 1 )); then
# Only add a newline if its not the first iteration
if [[ "$base_dir" != "${base_dirs[1]}" ]]; then
print
@@ -164,7 +201,7 @@ k () {
typeset -i TOTAL_BLOCKS=0
- MAX_LEN=(0 0 0 0 0 0)
+ MAX_LEN=(0 0 0 0 0 0 0)
# Array to hold results from `stat` call
RESULTS=()
@@ -173,32 +210,44 @@ k () {
typeset -i IS_GIT_REPO=0
typeset GIT_TOPLEVEL
- typeset -i LARGE_FILE_COLOR=196
+ #typeset -i LARGE_FILE_COLOR=196
+ typeset -i LARGE_FILE_COLOR=1
typeset -a SIZELIMITS_TO_COLOR
SIZELIMITS_TO_COLOR=(
- 1024 46 # <= 1kb
- 2048 82 # <= 2kb
- 3072 118 # <= 3kb
- 5120 154 # <= 5kb
- 10240 190 # <= 10kb
- 20480 226 # <= 20kb
- 40960 220 # <= 40kb
- 102400 214 # <= 100kb
- 262144 208 # <= 0.25mb || 256kb
- 524288 202 # <= 0.5mb || 512kb
+ # 1024 46 # <= 1kb
+ # 2048 82 # <= 2kb
+ # 3072 118 # <= 3kb
+ # 5120 154 # <= 5kb
+ # 10240 190 # <= 10kb
+ # 20480 226 # <= 20kb
+ # 40960 220 # <= 40kb
+ #102400 214 # <= 100kb
+ #262144 208 # <= 0.25mb || 256kb
+ #524288 202 # <= 0.5mb || 512kb
+ 3072 71 # <= 3kb
+ 51200 2 # <= 50kb
+ 262144 3 # <= 0.25mb || 256kb
+ 524288 16 # <= 0.5mb || 512kb
)
- typeset -i ANCIENT_TIME_COLOR=236 # > more than 2 years old
+ #typeset -i ANCIENT_TIME_COLOR=236 # > more than 2 years old
+ typeset -i ANCIENT_TIME_COLOR=18 # > more than 2 years old
typeset -a FILEAGES_TO_COLOR
FILEAGES_TO_COLOR=(
- 0 196 # < in the future, #spooky
- 60 255 # < less than a min old
- 3600 252 # < less than an hour old
- 86400 250 # < less than 1 day old
- 604800 244 # < less than 1 week old
- 2419200 244 # < less than 28 days (4 weeks) old
- 15724800 242 # < less than 26 weeks (6 months) old
- 31449600 240 # < less than 1 year old
- 62899200 238 # < less than 2 years old
+ # 0 196 # < in the future, #spooky
+ # 60 255 # < less than a min old
+ # 3600 252 # < less than an hour old
+ # 86400 250 # < less than 1 day old
+ # 604800 244 # < less than 1 week old
+ # 2419200 244 # < less than 28 days (4 weeks) old
+ #15724800 242 # < less than 26 weeks (6 months) old
+ #31449600 240 # < less than 1 year old
+ #62899200 238 # < less than 2 years old
+ 0 1 # < in the future, #spooky
+ 3600 21 # < less than an hour old
+ 86400 7 # < less than 1 day old
+ 604800 20 # < less than 1 week old
+ 2419200 8 # < less than 28 days (4 weeks) old
+ 31449600 19 # < less than 1 year old
)
# ----------------------------------------------------------------------------
@@ -211,38 +260,49 @@ k () {
# Check if it even exists
if [[ ! -e $base_dir ]]; then
print -u2 "k: cannot access $base_dir: No such file or directory"
+ continue
# If its just a file, skip the directory handling
elif [[ -f $base_dir ]]; then
show_list=($base_dir)
#Directory, add its contents
- else
+ elif pushd $base_dir 2>/dev/null; then
+ # Set if we're in a repo or not
+ typeset -i INSIDE_WORK_TREE=0
+ if $(git rev-parse --is-inside-work-tree 2> /dev/null); then
+ INSIDE_WORK_TREE=1
+ GIT_TOPLEVEL=$(git rev-parse --show-toplevel)
+ fi
+
# Break total blocks of the front of the stat call, then push the rest to results
- if [[ "$o_all" != "" && "$o_almost_all" == "" && "$o_no_directory" == "" ]]; then
- show_list+=($base_dir/.)
- show_list+=($base_dir/..)
+ if [[ -n "$o_all" && -z "$o_almost_all" && -z "$o_no_directory" ]]; then
+ show_list+=(.)
+ show_list+=(..)
fi
- if [[ "$o_all" != "" || "$o_almost_all" != "" ]]; then
- if [[ "$o_directory" != "" ]]; then
- show_list+=($base_dir/*(D/))
- elif [[ "$o_no_directory" != "" ]]; then
+ if [[ -n "$o_all" || -n "$o_almost_all" ]]; then
+ if [[ -n "$o_directory" ]]; then
+ show_list+=(*(D/$SORT_GLOB))
+ elif [[ -n "$o_no_directory" ]]; then
#Use (^/) instead of (.) so sockets and symlinks get displayed
- show_list+=($base_dir/*(D^/))
+ show_list+=(*(D^/$SORT_GLOB))
else
- show_list+=($base_dir/*(D))
+ show_list+=(*(D$SORT_GLOB))
fi
else
- if [[ "$o_directory" != "" ]]; then
- show_list+=($base_dir/*(/))
- elif [[ "$o_no_directory" != "" ]]; then
+ if [[ -n "$o_directory" ]]; then
+ show_list+=(*(/$SORT_GLOB))
+ elif [[ -n "$o_no_directory" ]]; then
#Use (^/) instead of (.) so sockets and symlinks get displayed
- show_list+=($base_dir/*(^/))
+ show_list+=(*(^/$SORT_GLOB))
else
- show_list+=($base_dir/*)
+ show_list+=(*($SORT_GLOB))
fi
fi
+ else
+ print -u2 "k: permission denied: $base_dir"
+ continue
fi
# ----------------------------------------------------------------------------
@@ -260,7 +320,7 @@ k () {
typeset -A $statvar
zstat -H $statvar -Lsn -F "%s^%d^%b^%H:%M^%Y" -- "$fn" # use lstat, render mode/uid/gid to strings
STATS_PARAMS_LIST+=($statvar)
- i+=1
+ (( i++ ))
done
@@ -273,14 +333,18 @@ k () {
if [[ ${#sv[uid]} -gt $MAX_LEN[3] ]]; then MAX_LEN[3]=${#sv[uid]} ; fi
if [[ ${#sv[gid]} -gt $MAX_LEN[4] ]]; then MAX_LEN[4]=${#sv[gid]} ; fi
- #if [[ "$o_human" != "" ]]; then
- if [[ "$o_raw" == "" ]]; then
+ #if [[ -n "$o_human" ]]; then
+ if [[ -z "$o_raw" ]]; then
h=$(numfmt_local ${sv[size]})
if (( ${#h} > $MAX_LEN[5] )); then MAX_LEN[5]=${#h}; fi
else
if [[ ${#sv[size]} -gt $MAX_LEN[5] ]]; then MAX_LEN[5]=${#sv[size]}; fi
fi
+ LNAME="${sv[name]}"
+ if [[ -n ${sv[link]} ]]; then LNAME="$LNAME -> ${sv[link]}"; fi
+ if [[ ${#LNAME} -gt $MAX_LEN[6] ]]; then MAX_LEN[6]=${#LNAME}; fi
+
TOTAL_BLOCKS+=$sv[blocks]
done
@@ -292,6 +356,7 @@ k () {
# ----------------------------------------------------------------------------
typeset REPOMARKER
+ typeset REPOBRANCH
typeset PERMISSIONS HARDLINKCOUNT OWNER GROUP FILESIZE FILESIZE_OUT DATE NAME SYMLINK_TARGET
typeset FILETYPE PER1 PER2 PER3 PERMISSIONS_OUTPUT STATUS
typeset TIME_DIFF TIME_COLOR DATE_OUTPUT
@@ -305,6 +370,7 @@ k () {
# We check if the result is a git repo later, so set a blank marker indication the result is not a git repo
REPOMARKER=" "
+ REPOBRANCH=""
IS_DIRECTORY=0
IS_SYMLINK=0
IS_SOCKET=0
@@ -342,27 +408,9 @@ k () {
# IS_GIT_REPO is a 1 if $NAME is a file/directory in a git repo, OR if $NAME is a git-repo itself
# GIT_TOPLEVEL is set to the directory containing the .git folder of a git-repo
- # is this a git repo
- if [[ "$o_no_vcs" != "" ]]; then
- IS_GIT_REPO=0
- GIT_TOPLEVEL=''
- else
- if (( IS_DIRECTORY ));
- then builtin cd -q $NAME 2>/dev/null || builtin cd -q - >/dev/null && IS_GIT_REPO=0 #Say no if we don't have permissions there
- else builtin cd -q $NAME:a:h 2>/dev/null || builtin cd -q - >/dev/null && IS_GIT_REPO=0
- fi
- if [[ $(command git rev-parse --is-inside-work-tree 2>/dev/null) == true ]]; then
- IS_GIT_REPO=1
- GIT_TOPLEVEL=$(command git rev-parse --show-toplevel)
- else
- IS_GIT_REPO=0
- fi
- builtin cd -q - >/dev/null
- fi
-
# Get human readable output if necessary
- #if [[ "$o_human" != "" ]]; then
- if [[ "$o_raw" == "" ]]; then
+ #if [[ -n "$o_human" ]]; then
+ if [[ -z "$o_raw" ]]; then
# I hate making this call twice, but its either that, or do a bunch
# of calculations much earlier.
FILESIZE_OUT=$(numfmt_local $FILESIZE)
@@ -395,14 +443,11 @@ k () {
PERMISSIONS_OUTPUT="$FILETYPE$PER1$PER2$PER3"
# --------------------------------------------------------------------------
- # Colour the symlinks
- # --------------------------------------------------------------------------
-
- # --------------------------------------------------------------------------
- # Colour Owner and Group
+ # Colour Hardlinkcound, Owner and Group
# --------------------------------------------------------------------------
- OWNER=$'\e[38;5;241m'"$OWNER"$'\e[0m'
- GROUP=$'\e[38;5;241m'"$GROUP"$'\e[0m'
+ HARDLINKCOUNT=$'\e[38;5;19m'"$HARDLINKCOUNT"$'\e[0m'
+ OWNER=$'\e[38;5;8m'"$OWNER"$'\e[0m'
+ GROUP=$'\e[38;5;8m'"$GROUP"$'\e[0m'
# --------------------------------------------------------------------------
# Colour file weights
@@ -444,38 +489,62 @@ k () {
# --------------------------------------------------------------------------
# Colour the repomarker
# --------------------------------------------------------------------------
- if [[ "$o_no_vcs" != "" ]]; then
- REPOMARKER=""
- elif (( IS_GIT_REPO != 0)); then
- # If we're not in a repo, still check each directory if it's a repo, and
- # then mark appropriately
- if (( INSIDE_WORK_TREE == 0 )); then
- if (( IS_DIRECTORY )); then
- if command git --git-dir="$GIT_TOPLEVEL/.git" --work-tree="${NAME}" diff --stat --quiet --ignore-submodules HEAD &>/dev/null # if dirty
- then REPOMARKER=$'\e[38;5;46m|\e[0m' # Show a green vertical bar for clean
- else REPOMARKER=$'\e[0;31m+\e[0m' # Show a red vertical bar if dirty
- fi
- fi
- else
- if (( IS_DIRECTORY )); then
- # If the directory isn't ignored or clean, we'll just say it's dirty
- if command git check-ignore --quiet ${NAME} 2>/dev/null; then STATUS='!!'
- elif command git diff --stat --quiet --ignore-submodules ${NAME} 2> /dev/null; then STATUS='';
- else STATUS=' M'
+ # GIT_TOPLEVEL is set to the directory containing the .git folder of a git-repo
+
+ # is this a git repo
+ if [[ -n "$o_no_vcs" ]]; then
+ STATUS='N'
+ elif (( IS_DIRECTORY )); then
+ if pushd $NAME 2>/dev/null; then
+ if $(git rev-parse --is-inside-work-tree 2>/dev/null); then
+ # If we're not in a repo, still check each directory if it's a repo, and
+ # then mark appropriately
+ if (( INSIDE_WORK_TREE == 0 )); then
+ REPOBRANCH="[$(git rev-parse --abbrev-ref HEAD 2>/dev/null)]"
+ if git diff --stat --quiet --ignore-submodules HEAD &>/dev/null # if dirty
+ then STATUS='' # Show a green vertical bar for clean
+ else STATUS='D' # Show a red vertical bar if dirty
+ fi
+ popd >/dev/null
+ else
+ popd >/dev/null
+ # If the directory isn't ignored or clean, we'll just say it's dirty
+ if git check-ignore --quiet ${NAME} 2>/dev/null; then STATUS='!!'
+ elif git diff --stat --quiet --ignore-submodules ${NAME} 2> /dev/null; then STATUS=''
+ else STATUS='D'
+ fi
fi
else
- # File
- STATUS=$(command git status --porcelain --ignored --untracked-files=normal $GIT_TOPLEVEL/${${${NAME:a}##$GIT_TOPLEVEL}#*/})
- fi
- STATUS=${STATUS[1,2]}
- if [[ $STATUS == ' M' ]]; then REPOMARKER=$'\e[0;31m+\e[0m'; # Tracked & Dirty
- elif [[ $STATUS == 'M ' ]]; then REPOMARKER=$'\e[38;5;082m+\e[0m'; # Tracked & Dirty & Added
- elif [[ $STATUS == '??' ]]; then REPOMARKER=$'\e[38;5;214m+\e[0m'; # Untracked
- elif [[ $STATUS == '!!' ]]; then REPOMARKER=$'\e[38;5;238m|\e[0m'; # Ignored
- elif [[ $STATUS == 'A ' ]]; then REPOMARKER=$'\e[38;5;082m+\e[0m'; # Added
- else REPOMARKER=$'\e[38;5;082m|\e[0m'; # Good
+ STATUS='N'
+ popd >/dev/null
fi
+ else
+ STATUS='N'
fi
+ elif (( INSIDE_WORK_TREE )); then
+ # File
+ STATUS=${$(git status --porcelain --ignored --untracked-files=normal $GIT_TOPLEVEL/${${${NAME:a}##$GIT_TOPLEVEL}#*/})[1]}
+ else
+ STATUS='N'
+ fi
+ case "$STATUS" in
+ (D) REPOMARKER=$'\e[0;31m+\e[0m';; # Tracked & Dirty
+ (M) REPOMARKER=$'\e[0;32m+\e[0m';; # Tracked & Dirty & Added
+ (\?\?) REPOMARKER=$'\e[38;5;16m+\e[0m';; # Untracked
+ (!!) REPOMARKER=$'\e[38;5;19|\e[0m';; # Ignored
+ (A) REPOMARKER=$'\e[0;32m+\e[0m';; # Added
+ (N) REPOMARKER=' ';; # Not a repo
+ (*) REPOMARKER=$'\e[0;32m|\e[0m';; # Clean
+ esac
+
+ # --------------------------------------------------------------------------
+ # Colour branch
+ # --------------------------------------------------------------------------
+ if [[ -n $REPOBRANCH ]]; then
+ REPOPAD="'$NAME"
+ if [[ -n $SYMLINK_TARGET ]]; then REPOPAD="$REPOPAD $SYMLINK_TARGET"; fi
+ REPOPAD="$(echo "${(l:MAX_LEN[6]:)REPOPAD}" | sed 's/\S.*//')"
+ REPOBRANCH="$REPOPAD"$'\e['"$K_COLOR_BR"'m'"$REPOBRANCH"$'\e[0m'
fi
# --------------------------------------------------------------------------
@@ -485,36 +554,44 @@ k () {
# But we don't want to quote '.'; so instead we escape the escape manually and use q-
NAME="${${NAME##*/}//$'\e'/\\e}" # also propagate changes to SYMLINK_TARGET below
- if [[ $IS_DIRECTORY == 1 ]]; then
- if [[ $IS_WRITABLE_BY_OTHERS == 1 ]]; then
- if [[ $HAS_STICKY_BIT == 1 ]]; then
- NAME=$'\e['"$K_COLOR_TW"'m'"$NAME"$'\e[0m';
+ if [[ -n "$LS_COLORS" ]] && ls --color -d . &>/dev/null; then
+ # We are using an ls that supports using colors from $LS_COLORS (probably GNU ls here)
+ #pushd "${base_dir}" &>/dev/null
+ NAME="$(ls --color=always -d "$NAME")"
+ #popd &>/dev/null
+ elif (( $IS_DIRECTORY == 1 )); then
+ if (( $IS_WRITABLE_BY_OTHERS == 1 )); then
+ if (( $HAS_STICKY_BIT == 1 )); then
+ NAME=$'\e['"$K_COLOR_TW"'m'"$NAME"$'\e[0m'
fi
- NAME=$'\e['"$K_COLOR_OW"'m'"$NAME"$'\e[0m';
+ NAME=$'\e['"$K_COLOR_OW"'m'"$NAME"$'\e[0m'
fi
- NAME=$'\e['"$K_COLOR_DI"'m'"$NAME"$'\e[0m';
- elif [[ $IS_SYMLINK == 1 ]]; then NAME=$'\e['"$K_COLOR_LN"'m'"$NAME"$'\e[0m';
- elif [[ $IS_SOCKET == 1 ]]; then NAME=$'\e['"$K_COLOR_SO"'m'"$NAME"$'\e[0m';
- elif [[ $IS_PIPE == 1 ]]; then NAME=$'\e['"$K_COLOR_PI"'m'"$NAME"$'\e[0m';
- elif [[ $HAS_UID_BIT == 1 ]]; then NAME=$'\e['"$K_COLOR_SU"'m'"$NAME"$'\e[0m';
- elif [[ $HAS_GID_BIT == 1 ]]; then NAME=$'\e['"$K_COLOR_SG"'m'"$NAME"$'\e[0m';
- elif [[ $IS_EXECUTABLE == 1 ]]; then NAME=$'\e['"$K_COLOR_EX"'m'"$NAME"$'\e[0m';
- elif [[ $IS_BLOCK_SPECIAL == 1 ]]; then NAME=$'\e['"$K_COLOR_BD"'m'"$NAME"$'\e[0m';
- elif [[ $IS_CHARACTER_SPECIAL == 1 ]]; then NAME=$'\e['"$K_COLOR_CD"'m'"$NAME"$'\e[0m';
+ NAME=$'\e['"$K_COLOR_DI"'m'"$NAME"$'\e[0m'
+ elif (( $IS_SYMLINK == 1 )); then NAME=$'\e['"$K_COLOR_LN"'m'"$NAME"$'\e[0m'
+ elif (( $IS_SOCKET == 1 )); then NAME=$'\e['"$K_COLOR_SO"'m'"$NAME"$'\e[0m'
+ elif (( $IS_PIPE == 1 )); then NAME=$'\e['"$K_COLOR_PI"'m'"$NAME"$'\e[0m'
+ elif (( $HAS_UID_BIT == 1 )); then NAME=$'\e['"$K_COLOR_SU"'m'"$NAME"$'\e[0m'
+ elif (( $HAS_GID_BIT == 1 )); then NAME=$'\e['"$K_COLOR_SG"'m'"$NAME"$'\e[0m'
+ elif (( $IS_EXECUTABLE == 1 )); then NAME=$'\e['"$K_COLOR_EX"'m'"$NAME"$'\e[0m'
+ elif (( $IS_BLOCK_SPECIAL == 1 )); then NAME=$'\e['"$K_COLOR_BD"'m'"$NAME"$'\e[0m'
+ elif (( $IS_CHARACTER_SPECIAL == 1 )); then NAME=$'\e['"$K_COLOR_CD"'m'"$NAME"$'\e[0m'
fi
# --------------------------------------------------------------------------
# Format symlink target
# --------------------------------------------------------------------------
- if [[ $SYMLINK_TARGET != "" ]]; then SYMLINK_TARGET="-> ${SYMLINK_TARGET//$'\e'/\\e}"; fi
+ if [[ -n $SYMLINK_TARGET ]]; then SYMLINK_TARGET="-> ${SYMLINK_TARGET//$'\e'/\\e}"; fi
# --------------------------------------------------------------------------
# Display final result
# --------------------------------------------------------------------------
- print -r -- "$PERMISSIONS_OUTPUT $HARDLINKCOUNT $OWNER $GROUP $FILESIZE_OUT $DATE_OUTPUT $REPOMARKER $NAME $SYMLINK_TARGET"
+ print -r -- "$PERMISSIONS_OUTPUT $HARDLINKCOUNT $OWNER $GROUP $FILESIZE_OUT $DATE_OUTPUT $REPOMARKER $NAME$SYMLINK_TARGET$REPOBRANCH"
- k=$((k+1)) # Bump loop index
+ (( k++ )) # Bump loop index
done
+ if [[ ! -f $base_dir ]]; then
+ popd >/dev/null
+ fi
done
}
@@ -546,4 +623,3 @@ _k_bsd_to_ansi() {
}
# http://upload.wikimedia.org/wikipedia/en/1/15/Xterm_256color_chart.svg
-# vim: set ts=2 sw=2 ft=zsh et :
diff --git a/base/zsh/lscolors.zsh b/base/zsh/lscolors.zsh
new file mode 100644
index 0000000..815ff79
--- /dev/null
+++ b/base/zsh/lscolors.zsh
@@ -0,0 +1,3 @@
+#export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
+
+export LS_COLORS='bd=33;1:ca=31;1;7:cd=33;1:di=34;1:do=35;1:ex=32;1:pi=33:fi=0:ln=target:mi=31;1;7:mh=33;1:no=0:or=31;1;7:ow=32;1;7:sg=33;1;7:su=42;1:so=35;1:st=44;1:tw=36;1;7:*README=38;5;16:*README.rst=38;5;16:*README.md=38;5;16:*LICENSE=38;5;16:*COPYING=38;5;16:*INSTALL=38;5;16:*COPYRIGHT=38;5;16:*AUTHORS=38;5;16:*HISTORY=38;5;16:*CONTRIBUTORS=38;5;16:*PATENTS=38;5;16:*VERSION=38;5;16:*NOTICE=38;5;16:*CHANGES=38;5;16:*.log=38;5;16:*.txt=0:*.etx=38;5;16:*.info=38;5;16:*.markdown=38;5;16:*.md=38;5;16:*.mkd=38;5;16:*.nfo=38;5;16:*.pod=38;5;16:*.rst=38;5;16:*.tex=38;5;16:*.textile=38;5;16:*.bib=33:*.json=33:*.jsonl=33:*.ndjson=33:*.msg=33:*.pgn=33:*.rss=33:*.xml=33:*.fxml=33:*.toml=33:*.yaml=33:*.yml=33:*.RData=33:*.rdata=33:*.xsd=33:*.dtd=33:*.sgml=33:*.rng=33:*.rnc=33:*.cbr=35:*.cbz=35:*.chm=35:*.djvu=35:*.pdf=35:*.PDF=35:*.mobi=35:*.epub=35:*.docm=35;4:*.doc=35:*.docx=35:*.odb=35:*.odt=35:*.rtf=35:*.odp=38;5;16;1:*.pps=38;5;16;1:*.ppt=38;5;16;1:*.pptx=38;5;16;1:*.ppts=38;5;16;1:*.pptxm=38;5;16;1;4:*.pptsm=38;5;16;1;4:*.csv=32:*.tsv=32:*.ods=32:*.xla=32:*.xls=32:*.xlsx=32:*.xlsxm=32;4:*.xltm=32;4:*.xltx=32:*config=1:*cfg=1:*conf=1:*rc=1:*authorized_keys=1:*known_hosts=1:*.ini=1:*.plist=1:*.viminfo=1:*.pcf=1:*.psf=1:*.hidden-color-scheme=1:*.hidden-tmTheme=1:*.last-run=1:*.merged-ca-bundle=1:*.sublime-build=1:*.sublime-commands=1:*.sublime-keymap=1:*.sublime-settings=1:*.sublime-snippet=1:*.sublime-project=1:*.sublime-workspace=1:*.tmTheme=1:*.user-ca-bundle=1:*.epf=1:*.git=35:*.gitignore=38;5;8:*.gitattributes=38;5;8:*.gitmodules=38;5;8:*.awk=32;1:*.bash=32;1:*.bat=32;1:*.BAT=32;1:*.sed=32;1:*.sh=32;1:*.zsh=32;1:*.vim=32;1:*.ahk=38;5;71:*.py=38;5;71:*.ipynb=38;5;71:*.rb=38;5;71:*.gemspec=38;5;71:*.pl=36:*.PL=36:*.t=36:*.msql=33:*.mysql=33:*.pgsql=33:*.sql=33:*.tcl=38;5;71:*.r=36:*.R=36:*.clj=38;5;71:*.cljs=38;5;71:*.cljc=38;5;71:*.cljw=38;5;71:*.scala=38;5;71:*.dart=36:*.asm=34:*.cl=34:*.lisp=34:*.rkt=34:*.lua=34:*.moon=34:*.c=34:*.C=34:*.h=34:*.H=34:*.tcc=34:*.c++=34:*.h++=34:*.hpp=34:*.hxx=34:*.ii=34:*.M=34:*.m=34:*.cc=34:*.cs=34:*.cp=34:*.cpp=34:*.cxx=34:*.cr=34:*.go=34:*.f=34:*.F=34:*.for=34:*.ftn=34:*.f90=34:*.F90=34:*.f95=34:*.F95=34:*.f03=34:*.F03=34:*.f08=34:*.F08=34:*.nim=34:*.nimble=34:*.s=34:*.S=34:*.rs=34:*.scpt=35:*.swift=35:*.sx=34:*.vala=34:*.vapi=34:*.hi=34:*.hs=34:*.lhs=34:*.agda=34:*.lagda=34:*.lagda.tex=34:*.lagda.rst=34:*.lagda.md=34:*.agdai=34:*.zig=34:*.pyc=38;5;8:*.tf=35:*.tfstate=35:*.tfvars=35:*.css=38;5;16:*.less=38;5;16:*.sass=38;5;16:*.scss=38;5;16:*.htm=38;5;16:*.html=38;5;16:*.jhtm=38;5;16:*.mht=38;5;16:*.eml=38;5;16:*.mustache=38;5;16:*.coffee=34:*.java=34:*.js=34:*.mjs=34:*.jsm=34:*.jsp=34:*.php=34:*.ctp=34:*.twig=34:*.vb=34:*.vba=34:*.vbs=34:*Dockerfile=38;5;71:*.dockerignore=38;5;8:*Makefile=38;5;71:*MANIFEST=38;5;8:*pm_to_blib=38;5;8:*.nix=38;5;71:*.dhall=38;5;16:*.rake=38;5;71:*.am=38;5;8:*.in=38;5;8:*.hin=38;5;8:*.scan=38;5;8:*.m4=38;5;8:*.old=38;5;8:*.out=38;5;8:*.SKIP=38;5;8:*.diff=38;5;17:*.patch=38;5;17:*.bmp=35:*.dicom=35:*.tiff=35:*.tif=35:*.TIFF=35:*.cdr=35:*.flif=35:*.gif=35:*.icns=35:*.ico=35:*.jpeg=35:*.JPG=35:*.jpg=35:*.nth=35:*.png=35:*.psd=35:*.pxd=35:*.pxm=35:*.xpm=35:*.webp=35:*.ai=35:*.eps=35:*.epsf=35:*.drw=35:*.ps=35:*.svg=35:*.avi=35:*.divx=35:*.IFO=35:*.m2v=35:*.m4v=35:*.mkv=35:*.MOV=35:*.mov=35:*.mp4=35:*.mpeg=35:*.mpg=35:*.ogm=35:*.rmvb=35:*.sample=35:*.wmv=35:*.3g2=35:*.3gp=35:*.gp3=35:*.webm=35:*.gp4=35:*.asf=35:*.flv=35:*.ts=35:*.ogv=35:*.f4v=35:*.VOB=35:*.vob=35:*.ass=33:*.srt=33:*.ssa=33:*.sub=33:*.sup=33:*.vtt=33:*.3ga=36:*.S3M=36:*.aac=36:*.amr=36:*.au=36:*.caf=36:*.dat=36:*.dts=36:*.fcm=36:*.m4a=36:*.mid=36:*.mod=36:*.mp3=36:*.mp4a=36:*.oga=36:*.ogg=36:*.opus=36:*.s3m=36:*.sid=36:*.wma=36:*.ape=36:*.aiff=36:*.cda=36:*.flac=36:*.alac=36:*.midi=36:*.pcm=36:*.wav=36:*.wv=36:*.wvc=36:*.afm=34:*.fon=34:*.fnt=34:*.pfb=34:*.pfm=34:*.ttf=34:*.otf=34:*.woff=34:*.woff2=34:*.PFA=34:*.pfa=34:*.7z=31:*.a=31:*.arj=31:*.bz2=31:*.cpio=31:*.gz=31:*.lrz=31:*.lz=31:*.lzma=31:*.lzo=31:*.rar=31:*.s7z=31:*.sz=31:*.tar=31:*.tgz=31:*.xz=31:*.z=31:*.zip=31:*.zipx=31:*.zoo=31:*.zpaq=31:*.zst=31:*.zstd=31:*.zz=31:*.apk=31:*.ipa=31:*.deb=31:*.rpm=31:*.jad=31:*.jar=31:*.cab=31:*.pak=31:*.pk3=31:*.vdf=31:*.vpk=31:*.bsp=31:*.dmg=31:*.r[0-9]{0,2}=31:*.zx[0-9]{0,2}=31:*.z[0-9]{0,2}=31:*.part=38;5;8:*.iso=31:*.bin=31:*.nrg=31:*.qcow=31:*.sparseimage=31:*.toast=31:*.vcd=31:*.vmdk=31:*.accdb=35:*.accde=35:*.accdr=35:*.accdt=35:*.db=35:*.fmp12=35:*.fp7=35:*.localstorage=35:*.mdb=35:*.mde=35:*.sqlite=35:*.typelib=35:*.nc=35:*.pacnew=34;1;7:*.un~=38;5;8:*.orig=38;5;8:*.BUP=38;5;8:*.bak=38;5;8:*.o=38;5;8:*core=38;5;8:*.mdump=38;5;8:*.rlib=38;5;8:*.dll=38;5;8:*.swp=38;5;8:*.swo=38;5;8:*.tmp=38;5;8:*.sassc=38;5;8:*.pid=38;5;20:*.state=38;5;20:*lockfile=38;5;20:*lock=38;5;20:*.err=31;1:*.error=31;1:*.stderr=31;1:*.aria2=38;5;8:*.dump=38;5;8:*.stackdump=38;5;8:*.zcompdump=38;5;8:*.zwc=38;5;8:*.pcap=36:*.cap=36:*.dmp=36:*.DS_Store=38;5;8:*.localized=38;5;8:*.CFUserTextEncoding=38;5;8:*.allow=32:*.deny=31:*.service=34:*@.service=34:*.socket=34:*.swap=34:*.device=34:*.mount=34:*.automount=34:*.target=34:*.path=34:*.timer=34:*.snapshot=34:*.application=36:*.cue=36:*.description=36:*.directory=36:*.m3u=36:*.m3u8=36:*.md5=36:*.properties=36:*.sfv=36:*.theme=36:*.torrent=36:*.urlview=36:*.webloc=36:*.lnk=36:*CodeResources=38;5;8:*PkgInfo=38;5;8:*.nib=35:*.car=35:*.dylib=38;5;8:*.entitlements=38;5;20:*.pbxproj=38;5;20:*.strings=38;5;20:*.storyboard=31:*.xcconfig=38;5;20:*.xcsettings=38;5;20:*.xcuserstate=38;5;20:*.xcworkspacedata=38;5;20:*.xib=38;5;16:*.asc=32:*.bfe=32:*.enc=32:*.gpg=32:*.signature=32:*.sig=32:*.p12=32:*.pem=32:*.pgp=32:*.p7s=32:*id_dsa=32:*id_rsa=32:*id_ecdsa=32:*id_ed25519=32:*.32x=35:*.cdi=35:*.fm2=35:*.rom=35:*.sav=35:*.st=35:*.a00=35:*.a52=35:*.A64=35:*.a64=35:*.a78=35:*.adf=35:*.atr=35:*.gb=35:*.gba=35:*.gbc=35:*.gel=35:*.gg=35:*.ggl=35:*.ipk=35:*.j64=35:*.nds=35:*.nes=35:*.sms=35:*.8xp=35:*.8eu=35:*.82p=35:*.83p=35:*.8xe=35:*.stl=38;5;17:*.dwg=38;5;17:*.ply=38;5;17:*.wrl=38;5;17:*.pot=0:*.pcb=38;5;17:*.mm=0:*.gbr=35:*.scm=35:*.xcf=35:*.spl=0:*.Rproj=36:*.sis=0:*.1p=0:*.3p=0:*.cnc=0:*.def=0:*.ex=0:*.example=0:*.feature=0:*.ger=0:*.ics=0:*.map=0:*.mf=0:*.mfasl=0:*.mi=0:*.mtx=0:*.pc=0:*.pi=0:*.plt=0:*.pm=0:*.rdf=0:*.ru=0:*.sch=0:*.sty=0:*.sug=0:*.tdy=0:*.tfm=0:*.tfnt=0:*.tg=0:*.vcard=0:*.vcf=0:*.xln=0:*.iml=0:'