improvement: consistent use of delimiter
This commit is contained in:
32
src/main.sh
32
src/main.sh
@@ -176,7 +176,7 @@ while true; do
|
||||
--list-border="top" \
|
||||
--list-label-pos=3 \
|
||||
--cycle \
|
||||
--delimiter='|' \
|
||||
--delimiter='\t' \
|
||||
--with-nth='{6}' \
|
||||
--accept-nth='1,2,3,4,5' \
|
||||
--preview="$0 --preview-event {}" \
|
||||
@@ -186,15 +186,15 @@ while true; do
|
||||
)+transform(
|
||||
[ -n \"\${TZ:-}\" ] && echo \"change-list-label:\$WHITE\$ITALIC(\$TZ)\$OFF\"
|
||||
)+transform(
|
||||
[ -n \"\$(echo {} | cut -d '|' -f 5)\" ] && echo show-preview
|
||||
[ -n \"\$(echo {} | cut -f 5)\" ] && echo show-preview
|
||||
)" \
|
||||
--bind="start:hide-preview" \
|
||||
--bind="j:down+hide-preview+transform([ -n \"\$(echo {} | cut -d '|' -f 5)\" ] && echo show-preview)" \
|
||||
--bind="k:up+hide-preview+transform([ -n \"\$(echo {} | cut -d '|' -f 5)\" ] && echo show-preview)" \
|
||||
--bind="ctrl-j:down+hide-preview+transform([ -n \"\$(echo {} | cut -d '|' -f 5)\" ] && echo show-preview)" \
|
||||
--bind="ctrl-k:up+hide-preview+transform([ -n \"\$(echo {} | cut -d '|' -f 5)\" ] && echo show-preview)" \
|
||||
--bind="down:down+hide-preview+transform([ -n \"\$(echo {} | cut -d '|' -f 5)\" ] && echo show-preview)" \
|
||||
--bind="up:up+hide-preview+transform([ -n \"\$(echo {} | cut -d '|' -f 5)\" ] && echo show-preview)" \
|
||||
--bind="j:down+hide-preview+transform([ -n \"\$(echo {} | cut -f 5)\" ] && echo show-preview)" \
|
||||
--bind="k:up+hide-preview+transform([ -n \"\$(echo {} | cut -f 5)\" ] && echo show-preview)" \
|
||||
--bind="ctrl-j:down+hide-preview+transform([ -n \"\$(echo {} | cut -f 5)\" ] && echo show-preview)" \
|
||||
--bind="ctrl-k:up+hide-preview+transform([ -n \"\$(echo {} | cut -f 5)\" ] && echo show-preview)" \
|
||||
--bind="down:down+hide-preview+transform([ -n \"\$(echo {} | cut -f 5)\" ] && echo show-preview)" \
|
||||
--bind="up:up+hide-preview+transform([ -n \"\$(echo {} | cut -f 5)\" ] && echo show-preview)" \
|
||||
--bind="l:hide-preview+reload:$0 --reload-day {1} '+1 day'" \
|
||||
--bind="h:hide-preview+reload:$0 --reload-day {1} '-1 day'" \
|
||||
--bind="right:hide-preview+reload:$0 --reload-day {1} '+1 day'" \
|
||||
@@ -214,11 +214,11 @@ while true; do
|
||||
if [ "$line" = "$key" ]; then
|
||||
line=""
|
||||
fi
|
||||
DISPLAY_DATE=$(echo "$line" | cut -d '|' -f 1)
|
||||
hour=$(echo "$line" | cut -d '|' -f 2)
|
||||
start=$(echo "$line" | cut -d '|' -f 3)
|
||||
end=$(echo "$line" | cut -d '|' -f 4)
|
||||
fpath=$(echo "$line" | cut -d '|' -f 5 | sed "s/ /|/g")
|
||||
DISPLAY_DATE=$(echo "$line" | cut -f 1)
|
||||
hour=$(echo "$line" | cut -f 2)
|
||||
start=$(echo "$line" | cut -f 3)
|
||||
end=$(echo "$line" | cut -f 4)
|
||||
fpath=$(echo "$line" | cut -f 5)
|
||||
if [ "$key" = "ctrl-n" ]; then
|
||||
if echo "$hour" | grep ":"; then
|
||||
hour="$DAY_START"
|
||||
@@ -371,7 +371,7 @@ while true; do
|
||||
--no-sort \
|
||||
--no-hscroll \
|
||||
--ellipsis="" \
|
||||
--delimiter="|" \
|
||||
--delimiter="\t" \
|
||||
--with-nth="{4}" \
|
||||
--accept-nth=1,2 \
|
||||
--ansi \
|
||||
@@ -408,8 +408,8 @@ while true; do
|
||||
if [ "$line" = "$key" ]; then
|
||||
line=""
|
||||
fi
|
||||
sign=$(echo "$line" | cut -d '|' -f 1)
|
||||
DISPLAY_DATE=$(echo "$line" | cut -d '|' -f 2)
|
||||
sign=$(echo "$line" | cut -f 1)
|
||||
DISPLAY_DATE=$(echo "$line" | cut -f 2)
|
||||
if [ "$key" = "ctrl-n" ]; then
|
||||
if [ "$sign" = "~" ]; then
|
||||
DISPLAY_DATE=""
|
||||
|
Reference in New Issue
Block a user