diff options
Diffstat (limited to 'kshrc')
-rw-r--r-- | kshrc | 42 |
1 files changed, 30 insertions, 12 deletions
@@ -64,21 +64,39 @@ esac PS1='$_XTERM_TITLE\A $_PS1_COLOR\u@\h$_PS1_CLEAR:$_PS1_BLUE\w$_PS1_COLOR\$$_PS1_CLEAR ' todj () { - cat /home/lemon/Notes/journal/2022-04-17.md + CMD=cat + if [[ $1 = "-vim" ]]; then + CMD=vim + fi + $CMD $(find /home/lemon/Notes/journal -name "*$(date '+%Y-%m-%d')*") +} + +tj () { + if [[ -z $1 ]]; then + echo "Please give me your message in quotes." + fi + echo $1 | _tj +} + +tjclip () { + if [[ -z $1 ]]; then + echo "Please give me your message in quotes." + fi + echo "$1: $(xclip -o -selection clipboard)." | _tj } # FZF -export FZF_DEFAULT_COMMAND='ag -g ""' -export FZF_CTRL_T_COMMAND=$FZF_DEFAULT_COMMAND -export FZF_ALT_C_COMMAND=$FZF_DEFAULT_COMMAND -export FZF_DEFAULT_OPTS='--color info:108,prompt:109,spinner:108,pointer:168,marker:168' +#export FZF_DEFAULT_COMMAND='ag -g ""' +#export FZF_CTRL_T_COMMAND=$FZF_DEFAULT_COMMAND +#export FZF_ALT_C_COMMAND=$FZF_DEFAULT_COMMAND +#export FZF_DEFAULT_OPTS='--color info:108,prompt:109,spinner:108,pointer:168,marker:168' #[ -f ~/.fzf.bash ] && source ~/.fzf.bash # from https://dataswamp.org/~solene/2021-10-17-ksh-fzf.html -function fzf-histo { - RES=$(fzf --tac --no-sort -e < $HISTFILE) - test -n "$RES" || exit 0 - eval "$RES" - } - -bind -m ^R=fzf-histo^J +#function fzf-histo { +# RES=$(fzf --tac --no-sort -e < $HISTFILE) +# test -n "$RES" || exit 0 +# eval "$RES" +# } +# +#bind -m ^R=fzf-histo^J |