bugfix: open attachment
This commit is contained in:
		@@ -918,7 +918,11 @@ __tentative_toggle() {
 | 
				
			|||||||
# @req $AWK_ATTACH: Awk script to add attachment
 | 
					# @req $AWK_ATTACH: Awk script to add attachment
 | 
				
			||||||
__add_attachment() {
 | 
					__add_attachment() {
 | 
				
			||||||
  fpath="$ROOT/$1"
 | 
					  fpath="$ROOT/$1"
 | 
				
			||||||
  f=$($FZF --prompt="Select attachment> ")
 | 
					  f=$(
 | 
				
			||||||
 | 
					    $FZF --prompt="Select attachment> " \
 | 
				
			||||||
 | 
					      --walker="file,hidden" \
 | 
				
			||||||
 | 
					      --walker-root="$HOME"
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
  if [ -z "$f" ] || [ ! -f "$f" ]; then
 | 
					  if [ -z "$f" ] || [ ! -f "$f" ]; then
 | 
				
			||||||
    return
 | 
					    return
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
@@ -1272,6 +1276,7 @@ while true; do
 | 
				
			|||||||
            --bind="start:hide-input" \
 | 
					            --bind="start:hide-input" \
 | 
				
			||||||
            --bind="ctrl-alt-d:show-input+change-query(ctrl-alt-d)+accept" \
 | 
					            --bind="ctrl-alt-d:show-input+change-query(ctrl-alt-d)+accept" \
 | 
				
			||||||
            --bind="load:transform:[ \"\$FZF_TOTAL_COUNT\" -eq 0 ] && echo 'unbind(enter)+unbind(ctrl-alt-d)'" \
 | 
					            --bind="load:transform:[ \"\$FZF_TOTAL_COUNT\" -eq 0 ] && echo 'unbind(enter)+unbind(ctrl-alt-d)'" \
 | 
				
			||||||
 | 
					            --bind="w:toggle-wrap" \
 | 
				
			||||||
            --bind="j:down" \
 | 
					            --bind="j:down" \
 | 
				
			||||||
            --bind="k:up" ||
 | 
					            --bind="k:up" ||
 | 
				
			||||||
          true
 | 
					          true
 | 
				
			||||||
@@ -1349,6 +1354,8 @@ while true; do
 | 
				
			|||||||
        case $yn in
 | 
					        case $yn in
 | 
				
			||||||
        "yes")
 | 
					        "yes")
 | 
				
			||||||
          $OPEN "$attpath"
 | 
					          $OPEN "$attpath"
 | 
				
			||||||
 | 
					          printf "Press <enter> to continue." >/dev/tty
 | 
				
			||||||
 | 
					          read -r tmp
 | 
				
			||||||
          break
 | 
					          break
 | 
				
			||||||
          ;;
 | 
					          ;;
 | 
				
			||||||
        "no")
 | 
					        "no")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user