mirror of https://github.com/garabik/grc.git
Compare commits
10 Commits
600cfa6169
...
bfc63e26a6
Author | SHA1 | Date |
---|---|---|
Jacob Menashe | bfc63e26a6 | |
Radovan Garabík | d8ad4fead5 | |
Radovan Garabík | 70277ef098 | |
Radovan Garabík | bedfa6cd01 | |
Radovan Garabík | e1b9adbad0 | |
Radovan Garabík | eac97e5ce4 | |
Cephi | a8d98ea229 | |
nodauf | 1612ab4954 | |
Shariq Malik | efecc041d7 | |
Florian | a6971517b2 |
|
@ -190,7 +190,7 @@ You can start using grc automatically with supported commands. The following ass
|
|||
To set aliases for supported commands, append to your `~/.bashrc`:
|
||||
|
||||
GRC_ALIASES=true
|
||||
[[ -s "/etc/profile.d/grc.sh" ]] && source /etc/grc.sh
|
||||
[[ -s "/etc/profile.d/grc.sh" ]] && source /etc/profile.d/grc.sh
|
||||
|
||||
If the file `/etc/default/grc` exists, it is sourced first, therefore you can place a line saying `GRC_ALIASES=true` there.
|
||||
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
# logo-ls is modern ls command with beautiful Icons and Git Integrations . Written in Golang
|
||||
# https://github.com/Yash-Handa/logo-ls
|
||||
#
|
||||
#
|
||||
# The following matches file sizes as produced by logo-ls -l or logo-ls -lh
|
||||
# The output produced by logo-ls -s is probably not specific
|
||||
# enough to be reliably matched, especially considering logo-ls -s(k|m|g|G).
|
||||
#
|
||||
# Example lines:
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀710 ⠀Sep 9 17:13:38⠀⠀_grc
|
||||
# Lrwxrwxrwx⠀MrSkoodle⠀mrskoodle⠀16 ⠀Sep 9 17:13:38⠀ﮦ⠀CHANGES@
|
||||
# drwxr-xr-x⠀MrSkoodle⠀mrskoodle⠀4096 ⠀Sep 9 17:31:34⠀⠀colourfiles/
|
||||
# drwxr-xr-x⠀MrSkoodle⠀mrskoodle⠀4096 ⠀Sep 9 17:13:38⠀⠀contrib/
|
||||
# Lrwxrwxrwx⠀MrSkoodle⠀mrskoodle⠀16 ⠀Sep 9 17:13:38⠀⠀COPYING@
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀619 ⠀Sep 9 17:13:38⠀⠀CREDITS
|
||||
# drwxr-xr-x⠀MrSkoodle⠀mrskoodle⠀4096 ⠀Sep 9 17:13:38⠀⠀debian/
|
||||
# -rwxr-xr-x⠀MrSkoodle⠀mrskoodle⠀5188 ⠀Sep 9 17:13:38⠀⠀grc*
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀1479 ⠀Sep 9 17:13:38⠀⠀grc.1
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀4107 ⠀Sep 9 17:35:50⠀⠀grc.conf
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀968 ⠀Sep 9 17:13:57⠀⠀grc.fish
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀1843 ⠀Sep 9 17:13:57⠀⠀grc.sh
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀1482 ⠀Sep 9 17:37:07⠀⠀grc.spec
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀1321 ⠀Sep 9 17:13:38⠀⠀grc.spec.old
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀975 ⠀Sep 9 17:36:26⠀⠀grc.zsh
|
||||
# -rwxr-xr-x⠀MrSkoodle⠀mrskoodle⠀10849⠀Sep 9 17:13:57⠀⠀grcat*
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀2492 ⠀Sep 9 17:13:38⠀⠀grcat.1
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀1021 ⠀Sep 9 17:13:38⠀⠀INSTALL
|
||||
# -rwxr-xr-x⠀MrSkoodle⠀mrskoodle⠀706 ⠀Sep 9 17:13:57⠀⠀install.sh*
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀9808 ⠀Sep 9 17:13:57⠀⠀README.markdown
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀11312⠀Sep 9 17:13:38⠀⠀Regexp.txt
|
||||
# -rw-r--r--⠀MrSkoodle⠀mrskoodle⠀74 ⠀Sep 9 17:13:38⠀⠀TODO
|
||||
|
||||
#
|
||||
# The regexp uses lookahead to match a date following the size
|
||||
|
||||
# size: 1M <= size < 10M
|
||||
regexp=\W+(\d{7}|\d(?:[,.]?\d+)*[KM])(?=\W*[A-Z][a-z]{2}\s)
|
||||
colours=green
|
||||
=======
|
||||
# size: 10M <= size < 100M
|
||||
regexp=\W+(\d{8}|\d\d(?:[,.]?\d+)*M)(?=\W*[A-Z][a-z]{2}\s)
|
||||
colours=yellow
|
||||
=======
|
||||
# size: 100M <= size < 1G
|
||||
regexp=\W+(\d{9}|\d{3}M)(?=\W*[A-Z][a-z]{2}\s)
|
||||
colours=red
|
||||
=======
|
||||
# size: 1G <= size
|
||||
regexp=\W+(\d{10,}|[\d.,]+G)(?=\W*[A-Z][a-z]{2}\s)
|
||||
colours=bold red
|
||||
=======
|
||||
# device major minor numbers
|
||||
regexp=\s(\d+),\s+(\d+)\s
|
||||
colours=default,bright_yellow ,yellow
|
||||
=======
|
||||
# Date-Time => G1=Month G2=Day G3=Hour G4=Minutes G5=Year
|
||||
regexp=([A-Z][a-z]{2})\s([ 1-3]\d)\s(?:([0-2]?\d):([0-5]\d):([0-5]\d))
|
||||
colours=unchanged,cyan,cyan,cyan,cyan,bold magenta
|
||||
=======
|
||||
# root
|
||||
regexp=\s*(root|wheel)(?=\s*|$)
|
||||
colours=unchanged,bold white on_red
|
||||
=======
|
||||
# SELinux
|
||||
regexp=(\w+_u):(\w+_r):(\w+_t):(\w\d)
|
||||
colours=default,green,yellow,cyan,magenta
|
||||
-
|
||||
# -rwxrwxrwx ============================
|
||||
# File Type
|
||||
regexp=(-|([bcCdDlMnpPs?]))(?=[-r][-w][-xsStT][-r][-w][-xsStT][-r][-w][-xsStT])
|
||||
colours=unchanged,unchanged,bold white
|
||||
-
|
||||
# owner rwx
|
||||
regexp=(?<=[-bcCdDlMnpPs?])(-|(r))(-|(w))(-|([xsStT]))(?=[-r][-w][-xsStT][-r][-w][-xsStT])
|
||||
colours=unchanged,unchanged,bright_green,unchanged,bright_green,unchanged,bright_green
|
||||
-
|
||||
# group rwx
|
||||
regexp=(?<=[-bcCdDlMnpPs?][-r][-w][-xsStT])(-|(r))(-|(w))(-|([xsStT]))(?=[-r][-w][-xsStT])
|
||||
colours=unchanged,unchanged,yellow,unchanged,yellow,unchanged,yellow
|
||||
-
|
||||
# other rwx
|
||||
regexp=(?<=[-bcCdDlMnpPs?][-r][-w][-xsStT][-r][-w][-xsStT])(-|(r))(-|(w))(-|([xsStT]))
|
||||
colours=unchanged,unchanged,bright_red,unchanged,bright_red,unchanged,bright_red
|
||||
-
|
||||
# sStT all
|
||||
regexp=(?<=[-bcCdDlMnpPs?])[-r][-w]([sStT])[-r][-w]([sStT])[-r][-w]([sStT])
|
||||
colours=unchanged,bold green,bold yellow, bold red
|
||||
-
|
||||
# ACL
|
||||
regexp=^\S{10}(\+)
|
||||
colours=unchanged,on_cyan bold white
|
|
@ -0,0 +1,41 @@
|
|||
regexp=^(PHPUnit )(\d+\.\d+\.\d+)(?:.*$)
|
||||
colours=dark, dark, dark
|
||||
======
|
||||
# Memory and time
|
||||
regexp=^Time: (\d\d:\d\d\.\d\d\d), Memory: (\d+\.\d\d MB)
|
||||
colours=dark, dark, dark
|
||||
======
|
||||
regexp=^(\w+(?:Error|Exception): ).*$
|
||||
colours=default, bright_red
|
||||
======
|
||||
# Error stack
|
||||
regexp=^((?:\w+:\/\/)?\/(?:[^\/]+\/)*)([^:]+)(?::)(\d+)$
|
||||
colours=bright_black, bright_black, dark, dark
|
||||
======
|
||||
# Number of errors
|
||||
regexp=^(?:^There (?:was|were) )(\d+)(?: (?:errors?|failures?):)$
|
||||
colours=default, bright_red
|
||||
======
|
||||
# Errors
|
||||
regexp=(ERRORS|FAILURES)!
|
||||
colours=bright_red
|
||||
======
|
||||
# Failure stats
|
||||
regexp=(?:Tests: (\d+)|Assertions: (\d+)|Errors: (\d+)|Failures: (\d+)|Incomplete: (\d+))
|
||||
colours=default, bright_green, bright_yellow, bright_red, bright_red, bright_cyan
|
||||
======
|
||||
# Success
|
||||
regexp=(OK) \((\d+) tests?, (\d+) assertions?\)
|
||||
colours=dark, bright_green, bold, bold
|
||||
======
|
||||
# Classes in general
|
||||
regexp=(?:[\s:"'])((?:[^\\\s]+\\)+)([^\s:"']+)(?:(?:::)([^\s"']+))?(?:[:\s"'])
|
||||
colours=default, dark, bold, bold
|
||||
======
|
||||
# Loading bar
|
||||
regexp=(?:.*)(\d+)(?:\s+)(\/)(?:\s+)(\d+)(?:\s+)(\()(\d+%)(\))
|
||||
colours=dark, bold, bold, bold, bold, bold, bold
|
||||
======
|
||||
# Test and its name
|
||||
regexp=^(?:^\d+\))(?: )((?:\w+\\)*)(\w+)(?:::)(\w+)
|
||||
colours=default, bright_black, dark, yellow
|
15
grc.conf
15
grc.conf
|
@ -78,9 +78,9 @@ conf.ifconfig
|
|||
^([/\w\.]+\/)?ls\s
|
||||
conf.ls
|
||||
|
||||
# mount
|
||||
^([/\w\.]+\/)?mount\b
|
||||
conf.mount
|
||||
# logo-ls command
|
||||
^([/\w\.]+\/)?logo-ls\s
|
||||
conf.logo-ls
|
||||
|
||||
# df
|
||||
^([/\w\.]+\/)?df\b
|
||||
|
@ -153,6 +153,10 @@ conf.fdisk
|
|||
^([/\w\.]+\/)?free\b
|
||||
conf.free
|
||||
|
||||
# base64
|
||||
^([/\w\.]+\/)?base64\b
|
||||
conf.json
|
||||
|
||||
------------
|
||||
# docker
|
||||
|
||||
|
@ -301,3 +305,8 @@ conf.log
|
|||
# GPG
|
||||
^([/\w\.]+\/)?gpg (-[kK]|--list-keys|--list-secret-keys|--fingerprint)\s?
|
||||
conf.gpg
|
||||
|
||||
# phpunit
|
||||
^(./vendor/bin/)?phpunit\b
|
||||
conf.phpunit
|
||||
|
||||
|
|
2
grc.fish
2
grc.fish
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# See also the plugin at https://github.com/oh-my-fish/plugin-grc
|
||||
|
||||
set -U grc_plugin_execs cat cvs df diff dig gcc g++ ls ifconfig \
|
||||
set -U grc_plugin_execs base64 cat cvs df diff dig gcc g++ ls ifconfig \
|
||||
make mount mtr netstat ping ps tail traceroute \
|
||||
wdiff blkid du dnf docker docker-compose docker-machine env id ip iostat journalctl kubectl \
|
||||
last lsattr lsblk lspci lsmod lsof getfacl getsebool ulimit uptime nmap \
|
||||
|
|
1
grc.sh
1
grc.sh
|
@ -11,6 +11,7 @@
|
|||
GRC="$(which grc)"
|
||||
if tty -s && [ -n "$TERM" ] && [ "$TERM" != dumb ] && [ -n "$GRC" ]; then
|
||||
alias colourify="$GRC -es"
|
||||
alias base64='colourify base64'
|
||||
alias blkid='colourify blkid'
|
||||
alias configure='colourify ./configure'
|
||||
alias df='colourify df'
|
||||
|
|
Loading…
Reference in New Issue