AutoYADM commit: 2025-05-10 14:59:04

This commit is contained in:
Daniel Fichtinger 2025-05-10 14:59:04 -04:00
parent affb9e052a
commit d7409496ef
3 changed files with 19 additions and 2 deletions

View file

@ -9,15 +9,17 @@
set -l cmd $argv[1]
# get clip contents, and preserve newlines
set -l contents (wl-paste -n | string collect -N)
set -l contents (wl-paste -n | string collect -N --allow-empty)
count "$contents"
if test "$cmd" = inline
# if there's more than 1 newline, it
# has to be linewise
set -l lines (string split -n \n "$contents")
set -S lines
set -S contents
printf "%s" "$(string join \n "$lines")"
# string join \n $lines
printf "%s" (string join \n $lines | string collect -N)
# if test "$newlines" -eq 1
# printf "%s" (string trim --chars \n "$contents")
# else