Daily notes for 2023-12-31

ยท 304 words ยท 2 minute read

Suffix aliases in zsh ๐Ÿ”—

Today I learned about suffix aliases in zsh. They look like:

alias -s md=$EDITOR

Typing foo.md will open that file in your $EDITOR, creating it if it’s not there already.

Given kitty and its ability to display images, I added a few to make it easier to preview them in the terminal:

alias -s jpg='kitten icat'

With the aliases in place, autocomplete recognizes them as candidates, similar to if you had +x set on them.

Screenshot of a text terminal displaying an image

More rtm from the command line ๐Ÿ”—

I made a small alias to get stuff into my RTM inbox and drop a #triage tag onto the item.

ib() {
    rtm add "$1 #triage"
}

The danger of anything like that is that you train yourself to drop things in your inbox but then have to pick through and triage them. The rtm CLI also takes aliases to help keep things nice and terse:

{
      "name": "triage",
      "description": "Show tasks from inbox marked triage.",
      "command": "ls",
      "args": "list:Inbox AND tag:triage"
}

… which gives me rtm triage as opposed to rtm list:Inbox AND tag:triage.

I’ve got another one to help me catch items with no dates:

   {
      "name": "loose",
      "description": "Show unscheduled tasks in the Iterable list.",
      "command": "ls",
      "args": "list:Iterable AND status:incomplete AND due:never"
    }

rtm loose to see everything in my Iterable box that doesn’t have a date.

… but Mike ๐Ÿ”—

… why not org-mode?

Mobile, basically. If I wanted to set up Dropbox on all my stuff I could probably have a decent mobile org experience. I don’t want to set up Dropbox, and my experiments with syncthing and its iOS client haven’t really given me comfort that the system would be very reliable.

… anyhow ๐Ÿ”—

It’s New Year’s Eve and I need to get to the liquor store. See you next year.