dotfiles/lib/shared/modules
Oliver Davies 6082de62b0 Look for .ignored/run when running commands
Make the `run` command cleverer by also searching for a `.ignored/run`
file, following the convention of always ignoring a `.ignored` directory
from Git.

This allows me to have a local `run` file that doesn't need to be
committed and pushed to the repo (e.g. it's too specific to me), and
being able to keep it outside of the root of the project directory where
it could be committed accidentally.

A similar approach was done by Andreas Möller using Makefiles in this
article:

https://localheinz.com/articles/2020/05/07/using-makefiles-in-projects-where-i-can-not-use-them

With this function, the `.ignored/run` file is executed if it's found
and exits with the status code of the command.

If not, it will fall back to using `./run` as before.

I considered reversing these and checking for `./run` first as there
could be a performance benefit but, if neither file is found, I want the
error to show `./run` and not `.ignored/run` as that's the main use
case.
2024-07-31 16:40:25 +01:00
..
zsh Look for .ignored/run when running commands 2024-07-31 16:40:25 +01:00
atuin.nix Revert "Use fzf for searching zsh history" 2024-06-01 14:38:55 +01:00
bat.nix Format using nixfmt 2024-03-18 20:34:51 +00:00
bin.nix Run nix fmt 2024-06-10 09:38:34 +01:00
direnv.nix Make configuration more modular 2024-03-16 22:38:39 +00:00
fzf.nix Make configuration more modular 2024-03-16 22:38:39 +00:00
git.nix Revert "git: use difftastic" 2024-07-28 13:30:11 +01:00
lsd.nix Configure lsd 2024-05-11 01:55:59 +02:00
neovim.nix Run nix fmt 2024-06-10 09:38:34 +01:00
nnn.nix Format using nixfmt 2024-03-18 20:34:51 +00:00
phpactor.nix Run nix fmt 2024-06-10 09:38:34 +01:00
ripgrep.nix Run nix fmt 2024-06-10 09:38:34 +01:00
starship.nix Configure starship prompt 2024-06-19 22:04:51 +01:00
syncthing.nix Move syncthing into its own module 2024-05-02 17:29:35 +01:00
tmux.nix tmux: update prefix key 2024-07-23 21:33:13 +01:00
wezterm.nix Run nix fmt 2024-06-10 09:38:34 +01:00
zsh.nix Revert "git: use difftastic by default" 2024-07-28 13:29:57 +01:00