Merge branch 'master' into xonsh

This commit is contained in:
Ryan Delaney 2022-03-09 10:45:21 -05:00
commit f22787191b
7 changed files with 78 additions and 24 deletions

23
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: 'Release'
on:
push:
branches: [master]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: 'Check out Git repository'
uses: actions/checkout@v2
- name: 'Generate shell files'
run: make generate
- name: 'Commit generated files'
if: ${{ success() }}
run: |
git config user.name 'github-actions'
git config user.email 'github-actions@github.com'
git add lscolors.sh lscolors.csh
git commit -m "Update shell files" || echo "No changes to commit"
git push

View File

@ -83,6 +83,7 @@ STICKY_OTHER_WRITABLE 48;5;235;38;5;139;3
.md 38;5;184 .md 38;5;184
.mkd 38;5;184 .mkd 38;5;184
.nfo 38;5;184 .nfo 38;5;184
.org 38;5;184
.pod 38;5;184 .pod 38;5;184
.rst 38;5;184 .rst 38;5;184
.tex 38;5;184 .tex 38;5;184
@ -263,6 +264,10 @@ STICKY_OTHER_WRITABLE 48;5;235;38;5;139;3
.cl 38;5;81 .cl 38;5;81
.lisp 38;5;81 .lisp 38;5;81
.rkt 38;5;81 .rkt 38;5;81
# Emacs Lisp
.el 38;5;81
.elc 38;5;241
.eln 38;5;241
# lua # lua
.lua 38;5;81 .lua 38;5;81
# Moonscript # Moonscript
@ -578,12 +583,18 @@ STICKY_OTHER_WRITABLE 48;5;235;38;5;139;3
# }}} # }}}
# partition images {{{2 # partition images {{{2
.iso 38;5;124 .iso 38;5;124
.img 38;5;124
.bin 38;5;124 .bin 38;5;124
.nrg 38;5;124 .nrg 38;5;124
.qcow 38;5;124 .qcow 38;5;124
.fvd 38;5;124
.sparseimage 38;5;124 .sparseimage 38;5;124
.toast 38;5;124 .toast 38;5;124
.vcd 38;5;124 .vcd 38;5;124
.vdi 38;5;124
.vhd 38;5;124
.vhdx 38;5;124
.vfd 38;5;124
.vmdk 38;5;124 .vmdk 38;5;124
# }}} # }}}
# databases {{{2 # databases {{{2

22
Makefile Normal file
View File

@ -0,0 +1,22 @@
FILE_NAME=lscolors
export XDG_DATA_HOME ?= $${$$HOME/.local/share}
all: generate
clean:
@command rm ${FILE_NAME}.sh 2>/dev/null || true
@command rm ${FILE_NAME}.csh 2>/dev/null || true
generate: clean
@dircolors -b LS_COLORS > ${FILE_NAME}.sh
@dircolors -c LS_COLORS > ${FILE_NAME}.csh
install: generate
@command cp ${FILE_NAME}.sh ${FILE_NAME}.csh ${XDG_DATA_HOME}
@echo "To enable the colors, add the following line to your shell's start-up script:"
@echo ""
@echo "For Bourne shell (e.g. ~/.bashrc or ~/.zshrc):"
@echo " source ${XDG_DATA_HOME}/${FILE_NAME}.sh"
@echo ""
@echo "For C shell (e.g. ~/.cshrc):"
@echo " source ${XDG_DATA_HOME}/${FILE_NAME}.csh"

View File

@ -42,18 +42,32 @@ You need GNU `dircolors` and a compatible directory listing tool, such as GNU
# Installation # Installation
An installation script is provided with this repository: The repo contains two compiled scripts `lscolors.sh` & `lscolors.csh`, which you can download & source directly or point your plugin manager to pick up one of them.
To enable the colors, add the following line to your shell's start-up script:
For Bourne shell (e.g. `~/.bashrc` or `~/.zshrc`):
```
source ~/path/to/lscolors.sh
```
For C shell (e.g. `~/.cshrc`):
```
source ~/path/to/lscolors.csh
```
If you prefer to manually generate these files, an installation script is provided with this repository:
```console ```console
$ mkdir /tmp/LS_COLORS && curl -L https://api.github.com/repos/trapd00r/LS_COLORS/tarball/master | tar xzf - --directory=/tmp/LS_COLORS --strip=1 $ mkdir /tmp/LS_COLORS && curl -L https://api.github.com/repos/trapd00r/LS_COLORS/tarball/master | tar xzf - --directory=/tmp/LS_COLORS --strip=1
$ ( cd /tmp/LS_COLORS && sh install.sh ) $ ( cd /tmp/LS_COLORS && make install )
To enable the colors, add the following line to your shell's start-up script: To enable the colors, add the following line to your shell's start-up script:
For Bourne shell (e.g. ~/.bashrc or ~/.zshrc): For Bourne shell (e.g. ~/.bashrc or ~/.zshrc):
. "~/.local/share/lscolors.sh" source "~/.local/share/lscolors.sh"
For C shell (e.g. ~/.cshrc): For C shell (e.g. ~/.cshrc):
. "~/.local/share/lscolors.csh" source "~/.local/share/lscolors.csh"
$ $
``` ```
@ -75,7 +89,7 @@ mpc search artist Laleh | ls_color
... and so on. ... and so on.
# Legal # Legal
© Copyright 2014-2020 Magnus Woldrich. © Copyright 2014-2022 Magnus Woldrich.
This program is distributed in the hope that it will be useful, but WITHOUT ANY This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A

View File

@ -1,19 +0,0 @@
#!/usr/bin/env sh
#
lscolors_data_dir="${XDG_DATA_HOME:-$HOME/.local/share}"
if dircolors -b LS_COLORS > lscolors.sh && dircolors -c LS_COLORS > lscolors.csh ; then
if mv -t "$lscolors_data_dir" lscolors.sh lscolors.csh ; then
cat <<EOF
To enable the colors, add the following line to your shell's start-up script:
For Bourne shell (e.g. ~/.bashrc or ~/.zshrc):
. "$lscolors_data_dir/lscolors.sh"
For C shell (e.g. ~/.cshrc):
. "$lscolors_data_dir/lscolors.csh"
EOF
fi
fi

1
lscolors.csh Normal file

File diff suppressed because one or more lines are too long

2
lscolors.sh Normal file

File diff suppressed because one or more lines are too long