From efff4d15d6f1551eb412415179bfaed08618a018 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 30 Mar 2023 09:48:37 +0100 Subject: added todj to bash --- bashrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bashrc') diff --git a/bashrc b/bashrc index 3db0574..172462c 100644 --- a/bashrc +++ b/bashrc @@ -8,6 +8,8 @@ export HISTCONTROL=ignoreboth # echo "output" >| file.txt to do it manually set -o noclobber +# Setting PATH +export PATH=~/bin/:$PATH # aliases alias xclip='xclip -selection c' @@ -37,3 +39,13 @@ export FZF_DEFAULT_OPTS="--color info:108,prompt:109,spinner:108,pointer:168,mar export=GPG_TTY="$(tty)" export=SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" gpgconf --launch gpg-agent + +# Functions +todj () { + if [[ "$1" = "-v" ]]; then + CMD=vim + else + CMD=cat + fi + $CMD $(find /home/lemon/Documents/Notes/journal -name "*$(date '+%Y-%m-%d')*") +} -- cgit v1.2.3