summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-06-18 14:57:21 -0700
committerBen Sima <ben@bsima.me>2020-06-18 14:57:21 -0700
commit2f4ad187043897812b0f2bfdcfb5596034ba8ff9 (patch)
treee61cf5459ad68e661a28b212f8f858e49dd17315 /lib
parentf0d3235b851387b142f78acb8f8f21215406a00e (diff)
bash: add ff and regex aliases
Diffstat (limited to 'lib')
-rw-r--r--lib/common.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/common.nix b/lib/common.nix
index 5c923ae..e9c270e 100644
--- a/lib/common.nix
+++ b/lib/common.nix
@@ -148,6 +148,12 @@ in
done
cd "$P"
}
+ function ff() {
+ find . -iname "*$@*" -not -path "*.git*"
+ }
+ function regex {
+ gawk 'match($0,/'$1'/, ary) {print ary['\$\{2:-'0'}']}';
+ }
# my prompt, after much chagrin
export PS1="\n\[\e[34m\][\u@\h:\w]\[\e[m\] \$(date +%Y.%m.%d..%H.%M) \$(if [ \$? == 0 ]; then true; else echo \(\$?\); fi) \n$ "
'';