mirror of
https://github.com/notwa/rc
synced 2024-10-31 16:54:35 -07:00
ignore backup and completion files in few places
This commit is contained in:
parent
444c34f98e
commit
51f4d241b2
3 changed files with 11 additions and 1 deletions
|
@ -38,7 +38,7 @@ ADDPATH "$HOME/sh"
|
||||||
# unlike zsh, we do not check the sha1sum of the output.
|
# unlike zsh, we do not check the sha1sum of the output.
|
||||||
cd ~/sh \
|
cd ~/sh \
|
||||||
&& printf "%s\n" '#!/usr/bin/env false' '[ -n "$preload" ] || exit 1' '' \
|
&& printf "%s\n" '#!/usr/bin/env false' '[ -n "$preload" ] || exit 1' '' \
|
||||||
| cat - $(grep -lF YES_BASH -- $(find ~/sh/ -maxdepth 1 -type f)) \
|
| cat - $(grep -lF YES_BASH -- $(find ~/sh/ -maxdepth 1 -type f '!' -name '*.bak')) \
|
||||||
> ~/.sh-bash
|
> ~/.sh-bash
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,12 @@ document1() {
|
||||||
printf '\n## %s\n' 'shell functions' >> "$out" || return 5
|
printf '\n## %s\n' 'shell functions' >> "$out" || return 5
|
||||||
for f in sh/*; do
|
for f in sh/*; do
|
||||||
[ -e "$f" ] || continue # make sure glob went through
|
[ -e "$f" ] || continue # make sure glob went through
|
||||||
|
|
||||||
|
local fn="${f##*/}"
|
||||||
|
# ignore some stuff:
|
||||||
|
[ "$fn" = "${fn#_}" ] || continue # completion files
|
||||||
|
[ "$fn" = "${fn%.bak}" ] || continue # backup files
|
||||||
|
|
||||||
document2 "$f" >> "$out" || return
|
document2 "$f" >> "$out" || return
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
4
tableize
4
tableize
|
@ -21,6 +21,10 @@ tableize() {
|
||||||
[ -f "$f" ] || continue # probably failed to glob
|
[ -f "$f" ] || continue # probably failed to glob
|
||||||
|
|
||||||
local fn="${f##*/}"
|
local fn="${f##*/}"
|
||||||
|
# ignore some stuff:
|
||||||
|
[ "$fn" = "${fn#_}" ] || continue # completion files
|
||||||
|
[ "$fn" = "${fn%.bak}" ] || continue # backup files
|
||||||
|
|
||||||
local i=0 zsh= bash= dash= ash= pref=
|
local i=0 zsh= bash= dash= ash= pref=
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
: $((i+=1))
|
: $((i+=1))
|
||||||
|
|
Loading…
Reference in a new issue