Yesssss tldr is awesome!
I build tools in clojure and games in godot!
Yesssss tldr is awesome!
The simple and probably better answer is that you can just vim ~/.zsh_history
and search for/delete the lines directly.
Buuuuut! I wrote zsh command for doing exactly that a few years ago (in my dotfiles, but i’ve pasted it below as well):
################################################################################
# Delete from history via fzf
################################################################################
# https://superuser.com/questions/1316668/zsh-bash-delete-specific-lines-from-history
function delete-command () {
# Prevent the specified history line from being saved.
local HISTORY_IGNORE="${(b)$(fc -ln $1 $1)}"
# Write out the history to file, excluding lines that match `$HISTORY_IGNORE`.
fc -W
# Dispose of the current history and read the new history from file.
fc -p "$HISTFILE" "$HISTSIZE" "$SAVEHIST"
# TA-DA!
print "Deleted '$HISTORY_IGNORE' from history."
}
function pick_from_history () {
history | fzf --tac --tiebreak=index | perl -ne 'm/^\s*([0-9]+)/ and print "$1"'
}
function delete_from_history () {
delete-command "$(pick_from_history)"
}
It uses fzf
to filter and select a command to delete. It’s cool but might be slow b/c you’re doing it one at a time. It also may depend on your zsh config (i think the history
command i’m using there comes from ohmyzsh, but i’m not too sure).
After further inspection, Atuin looks sweet! Looks like they encrypt your history and offer finer-grained search (like dates and things). Great rec, thanks for sharing!
Interesting, syncing history across machines is pretty cool. While writing this I went looking for my yabai logs helper as an example, but of course, it’s on my other machine, haha
Security (sharing secrets from that history) comes to mind, so I feel compelled to mention that adding a space
before a command is a pattern for preventing it from being stored in history, though I think I had to opt-in to that in my zsh config: setopt HIST_IGNORE_SPACE
every time i’m playing some old guilty pleasure that isn’t ‘actually good’ (think: just wanted to play a jock jam for a moment), i worry about the influence on next week’s discover weekly…
I knew I’d seen something like this, and was very happy to find this in my notes from a few years ago: https://devchallenges.io/
There are a few full-stack ‘challenges’, ultimately building up to a twitter and then trello clone. Maybe it’s the kind of thing you’re looking for? I’m not sure if the submit + review portion of the site is still a thing, but w/e, you can still take the ideas and build your own thing.
Here’s a quick article on it from the creator: https://dev.to/nghiemthu/8-projects-with-modern-designs-to-become-a-full-stack-master-2020-14j9
One thought I had when looking through these is that keeping the project small (e.g. an image uploader that adds a filter and renders it) might be preferrable to an otherwise larger/never-ending project. OR you could do more design work for a larger site if that’s the part of software you want to practice.
You might also look into coding ‘kata’ or something like advent of code, tho that’s definitely a different direction and lower-level scope.
Building stuff is fun! Good luck with it!
Nice. Classic rust reimplementation.