Abstracted so other users may use the script

master
Stephen Cochrane 3 years ago
parent 0fe85e13f7
commit c7a50174c8
  1. 8
      todo

@ -25,7 +25,11 @@ main()
return
;;
s)
term='st -e' # Run in new terminal
# Set the default term
term=
command -v st && term='st -e' # Run in new terminal
[ -z "$term" ] && command -v gnome-terminal && \
term='gnome-terminal --' # Run in new terminal
;;
*)
echo 'TODO. usage()'
@ -46,6 +50,8 @@ main()
done
;;
''|pdf)
open=
! command -v pdf && open='xdg-open' || open=pdf
open=${1:-"$EDITOR"} # What to open the file with.
run="select open in *.${1:-md}; do $open \"\$open\"; done" # Funky eval string
if [ -n "$term" ]

Loading…
Cancel
Save