From baecea1cbe84918c86de0ca55ab5b1d3aaba49e8 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sun, 9 Jan 2022 17:08:13 +0100 Subject: feat(users/Profpatsch/nix-home): add findia* aliases Change-Id: I66d3e69ae2cb4cf56a49c970f59f62fa945dd736 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4840 Tested-by: BuildkiteCI Reviewed-by: Profpatsch Autosubmit: Profpatsch --- users/Profpatsch/aliases.nix | 75 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 users/Profpatsch/aliases.nix (limited to 'users/Profpatsch/aliases.nix') diff --git a/users/Profpatsch/aliases.nix b/users/Profpatsch/aliases.nix new file mode 100644 index 000000000000..6a1c2c1a63c3 --- /dev/null +++ b/users/Profpatsch/aliases.nix @@ -0,0 +1,75 @@ +{ depot, pkgs, lib, ... }: + +let + bins = depot.nix.getBins pkgs.findutils [ "find" ]; + +in +depot.nix.readTree.drvTargets { + + findia = depot.nix.writeExecline "findia" + { + readNArgs = 1; + # TODO: comment out, thanks to sterni blocking the runExecline change + # meta.description = '' + # Find case-insensitive anywhere (globbing) + + # Usage: findia + # ''; + } [ + bins.find + "-iname" + "*\${1}*" + "$@" + ]; + + findial = depot.nix.writeExecline "findial" + { + readNArgs = 1; + # TODO: comment out, thanks to sterni blocking the runExecline change + # meta.description = '' + # Find case-insensitive anywhere (globbing), follow symlinks"; + + # Usage: findial + # ''; + } [ + bins.find + "-L" + "-iname" + "*\${1}*" + "$@" + ]; + + findian = depot.nix.writeExecline "findian" + { + readNArgs = 2; + # TODO: comment out, thanks to sterni blocking the runExecline change + # meta.description = '' + # Find case-insensitive anywhere (globbing) in directory + + # Usage: findian + # ''; + } [ + bins.find + "$1" + "-iname" + "*\${2}*" + "$@" + ]; + + findiap = depot.nix.writeExecline "findiap" + { + readNArgs = 2; + # TODO: comment out, thanks to sterni blocking the runExecline change + # meta.description = '' + # Find case-insensitive anywhere (globbing) in directory, the pattern allows for paths. + + # Usage: findiap + # ''; + } [ + bins.find + "$1" + "-ipath" + "*\${2}*" + "$@" + ]; +} -- cgit 1.4.1