config: improved matching

This commit is contained in:
xeruf 2023-01-31 19:10:27 +01:00
parent 07885afa1b
commit 5f55c4bbd2
5 changed files with 27 additions and 18 deletions

View File

@ -123,8 +123,8 @@ Version 2019-11-04 2021-02-16"
:desc "Markdown to Zulip" "mam" "gg4dip
:%s/<\\/?span ?[^ >]*>//g
:%s/\\n\\n<a id=.*<\\/a>\\n\\n//g
:%s/<\\(http[^ \\n]+\\)>/\\1/g
:%s/\\\\<\\(.*\\)\\\\>/<\\1>/g "
:%s/<\\(http[^ \\n]+\\)>/\\1/g "
;:%s/\\\\<\\([^ \\n]+\\)\\\\>/<\\1>/g "
;:%s/\\n *\\n /\\n /
;:%s/ / /g "
)

View File

@ -4,11 +4,15 @@ matches:
- trigger: ";grue"
replace: |-
Grüße,
Janek
Janek
- trigger: ";gree"
replace: |-
Best,
Janek
Janek
- trigger: ";greg"
replace: |-
Greetings from Germany,
Janek
- trigger: ";date"
replace: "{{mydate}}"
vars:

View File

@ -8,6 +8,7 @@
"/home/janek/.local/share/puddletag/actions/Artist splitting.action",
"/home/janek/.local/share/puddletag/actions/Genre Splitting.action",
"/home/janek/.local/share/puddletag/actions/Swap artists.action",
"/home/janek/.local/share/puddletag/actions/Genre Christian.action",
"/home/janek/.local/share/puddletag/actions/Genre House.action",
"/home/janek/.local/share/puddletag/actions/Genre Acoustic.action",
"/home/janek/.local/share/puddletag/actions/Genre Canto.action",
@ -17,7 +18,7 @@
},
"main": {
"lang": "auto",
"lastfolder": "/home/janek/data/4-media/music/Electronic/Feint",
"lastfolder": "/home/janek/data/4-media/music/Worship/Qobuz-commandes",
"maximized": false
},
"playlist": {
@ -44,7 +45,7 @@
"fontsize": 10,
"rowsize": 43,
"sort_fields": [
"title"
"album"
],
"sort_reverse": false
},
@ -131,7 +132,8 @@
"checked": [
"Standard",
"Artist splitting",
"Genre Splitting"
"Genre Splitting",
"Genre: Christian"
]
},
"quick_actions": {

View File

@ -481,7 +481,7 @@ killJava() {
# Files {{{1
which exa >/dev/null &&
alias l='exa --icons' &&
alias l='exa --icons --group-directories-first' &&
alias ll='l --long --extended --git --all'
if which fd >/dev/null 2>&1

View File

@ -7,18 +7,21 @@
# - host
# - target directory name (and further arguments to clone)
# In an existing repo, first arg is omitted
test $# -eq 0 && echo "Usage: $0 [repo (omit if in repo)] [upstream owner] [own user] [url]" && exit 2
# TODO check from subdir
if test -d ".git"
if test -d ".git" # TODO search upwards
then repo="$(basename "$PWD")"
git remote set-url origin "$(git-repo "${3:-github.com}" "$repo" "$2" "${@:4}")"
else repo="$1" && shift
test -d "$d1" && cd "$d1/0-forks"
if ! git-get "${3:-github.com}" "$repo" "${2:-$(git config --get user.name)}" "${@:4}"
then repo="$1-$repo"
git-get "${3:-github.com}" "$repo" "${2:-$(git config --get user.name)}" "${@:4}"
git remote set-url origin "$(git-repo "${3:-github.com}" "$repo" "${2:-$(git config --get user.name)}" "${@:4}")"
else test $# -eq 0 && echo "Usage: $0 [repo (omit if in repo)] [upstream owner] [own user] [url]" && exit 2
repo="$1" && shift
if test "$#" -eq 0
then git-get "$repo"
else
test -d "$d1" && cd "$d1/0-forks"
if ! git-get "${3:-github.com}" "$repo" "${2:-$(git config --get user.name)}" "${@:4}"
then repo="$1-$repo"
git-get "${3:-github.com}" "$repo" "${2:-$(git config --get user.name)}" "${@:4}"
fi
fi
cd "$(expr "$4" \| "$repo")"
cd "$(basename "$(expr "$4" \| "$repo")")"
fi
user="${1:-$repo}"
git remote remove upstream 2>/dev/null || true