cmd-drawer

A drawer to store ur commands.
Recommended for people who write a alias but forget about it.

setup

.zshrc

function drawer() {
  local output
  if output=$(cmd-drawer); then
    print -z -r "${output}" #INFO -z: output into next prompt, -r: ignore escape sequence
  else
    echo "Err: failed to take out a command."
  fi
}

config

~/.config/cmd-drawer/default-config.toml

[[zsh]]
cmd = '''sudo nixos-rebuild switch'''
desc = '[nixos] update'

[[zsh]]
cmd = '''sudo -e /etc/nixos/configuration.nix'''
desc = '[nixos] edit config'

[[zsh]]
cmd = '''cd ~/.config/nixpkgs'''
desc = '[nixos] cd to nixpkgs'