rc/: Escaping cleanups in bundled scripts

Remove escapes that trigger errors when experimenting with doubling-up
escaping.
This commit is contained in:
Maxime Coste 2018-05-21 22:14:43 +10:00
parent 6ce248b59c
commit 5ad188e14c
3 changed files with 9 additions and 9 deletions

View File

@ -7,19 +7,19 @@ declare-option -docstring "colon separated list of paths to tag files to parse w
str-list ctagsfiles 'tags'
define-command -params ..1 \
-shell-candidates '
-shell-candidates %{
realpath() { ( path=$(readlink "$1"); cd "$(dirname "$1")"; printf "%s/%s\n" "$(pwd -P)" "$(basename "$1")" ) }
printf %s\\n "$kak_opt_ctagsfiles" | tr \':\' \'\n\' |
printf %s\\n "$kak_opt_ctagsfiles" | tr ':' '\n' |
while read -r candidate; do
[ -f "$candidate" ] && realpath "$candidate"
done | awk \'!x[$0]++\' | # remove duplicates
done | awk '!x[$0]++' | # remove duplicates
while read -r tags; do
namecache="${tags%/*}/.kak.${tags##*/}.namecache"
if [ -z "$(find "$namecache" -prune -newer "$tags")" ]; then
cut -f 1 "$tags" | uniq > "$namecache"
fi
cat "$namecache"
done' \
done} \
-docstring %{ctags-search [<symbol>]: jump to a symbol's definition
If no symbol is passed then the current selection is used as symbol name} \
ctags-search \

View File

@ -12,7 +12,7 @@ hook global BufCreate .*[.](hs) %{
# ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter shared/ regions -default code haskell \
string '(?<!\'\\)(?<!\')"' (?<!\\)(\\\\)*" '' \
string (?<!'\\)(?<!')" (?<!\\)(\\\\)*" '' \
macro ^\h*?\K# (?<!\\)\n '' \
pragma \{-# '#-\}' \{- \
comment \{- -\} \{- \

View File

@ -12,10 +12,10 @@ hook global BufCreate .*\.p[lm] %{
# ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter shared/ regions -default code perl \
command '(?<!\$)(?<!\\)`' (?<!\\)(\\\\)*` '' \
double_string '(?<!\$)(?<!\\)"' (?<!\\)(\\\\)*" '' \
single_string "(?<!\\$)(?<!\\\\)'" (?<!\\)(\\\\)*' '' \
comment '(?<!\$)(?<!\\)#' $ ''
command (?<!\$)(?<!\\)` (?<!\\)(\\\\)*` '' \
double_string (?<!\$)(?<!\\)" (?<!\\)(\\\\)*" '' \
single_string (?<!\$)(?<!\\\\)' (?<!\\)(\\\\)*' '' \
comment (?<!\$)(?<!\\)# $ ''
add-highlighter shared/perl/command fill magenta
add-highlighter shared/perl/double_string fill string