# version 1.3, 2025-12-17

bind-key -T insert_strings m display-menu -T 'insert strings : misc' \
	' --- function command lines ---' '' '' \
	' create file hash'                        '1' 'send-keys "file=agetty.strace ; test -f \"\$file\" && { hashfile=\"\${file}.sha256\"; if [ -f \"\$hashfile\" ]; then echo \"ERROR; file exists\"; ls -l \"\$hashfile\"; else ls -lh \"\$hashfile\"; pv <\"\$file\" | sha256sum | { read hash rest; echo \"\${hash}  \${file}\"; } | tee \"\$hashfile\"; fi; }"' \
	' find files and sum their sizes'          '2' "send-keys \"find /tmp -type f ! -name $'*\\n*' -user mha -mtime -1 -ls | awk '{ sum+=$7; }; END { print sum; }' | to-iec\"" \
	' find files opened for writing and CWDs'  '3' "send-keys \"lsof -F pat -- /mnt/bigdata | grep -q -e ^fcwd -e '^a[wac]'" \
	' show packages explicitly installed by the user' '4' 'send-keys "apt-mark showmanual"' \
	'' \
	' --- commands with arguments ---' '' '' \
	' aptitude why'                            '5' 'send-keys "aptitude why <package>"' \
	' apt-file update'                         '6' 'send-keys "apt-file update"' \
	' apt-file search'                         '7' 'send-keys "apt-file search libnvidia-cfg.so.1"' \
	' cp+'                                     '8' 'send-keys "cp --preserve=mode,ownership,timestamps,context,links,xattr,all"' \
	' dd+'                                     '9' 'send-keys "dd status=progress conv=sparse"' \
	' grep'                                    '0' 'send-keys "grep --word-regexp --line-regexp --files-without-match --files-with-matches --devices=skip|read --directories=skip|read|recurse --exclude=\"*~\" --include=\"*.txt\""' \
	' journalctl (since last unit activation)' 'a' 'send-keys "service=postfix.service ; journalctl -u \"$\service\" --since="\$\(systemctl show -p ActiveEnterTimestamp "\$\service"\ | cut -d= -f2)"\"' \
	' passwd: lock'                            'b' 'send-keys "passwd --delete --lock "' \
	' puppet agent --test --noop'              'c' 'send-keys "puppet agent --test --noop"' \
	' puppetserver ca list'                    'd' 'send-keys "puppetserver ca list"' \
	' puppetserver ca sign --certname'         'e' 'send-keys "puppetserver ca sign --certname"' \
	'' \
	' systemctl --show-transaction'             'f' 'send-keys "systemctl --show-transaction"' \
	' systemctl --job-mode=ignore-dependencies' 'g' 'send-keys "systemctl --job-mode=ignore-dependencies"' \
	' systemctl --job-mode=triggering'          'h' 'send-keys "systemctl --job-mode=triggering"' \
	' systemd-analyze verify'                   'i' 'send-keys "systemd-analyze verify /etc/systemd/system/$( systemctl get-default )' \
	' systemd-run (timer)'                      'j' 'send-keys "systemd-run --unit=systemd-run-cmd --on-calendar=01:44"' \
	' tar --create'                             'k' 'send-keys "tar --one-file-system --absolute-names --anchored --ignore-case --no-wildcards --no-wildcards-match-slash --use-compress-program=lbzip2 --exclude=GLOB --zstd"' \
	' tar --extract'                            'l' 'send-keys "tar --no-same-owner --no-same-permissions"' \
	' zstd'                                     'm' 'send-keys "zstd --threads=8"'
