A simpler shell prompt

2024-09-14

TIL about fzf built-in history command, fc, that keeps track of when you issue commands and how long they take to complete. It’s critical info when I need it, but I regularly don’t need it and so far I had been printing timestamps as part of my shell prompt. Time to update my aliases.zsh:

alias h='fc -lt "%b %d %H:%M:%S"'
alias history="echo 'use h'"  # Reduce unnecessary keystrokes while we're at this

Prompt BEFORE:

HH:MM:SS <git_branch_name> <current_dir_name>

Prompt AFTER:

<git_branch_name> <current_dir_name>

I tried removing the two elements that are left, but I need to know where I am all the time and with certainty.

References