From 9ac115e05f82ebb2a8998f91a32d8efdac6c659d Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sun, 6 Jul 2025 18:09:06 +0200 Subject: update --- .bashrc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '.bashrc') diff --git a/.bashrc b/.bashrc index 317bdb6..68eedfc 100644 --- a/.bashrc +++ b/.bashrc @@ -42,8 +42,10 @@ case $OS in ;; esac -p() { [ -f "$1" -a ! -x "$1" ] && less "$1" || "$@" 2>&1 | less; } -export -f p +# Exported functions +d() { date +%F; } +p() { [ -f "$1" -a ! -x "$1" ] && less "$1" || "$@" 2>&1 | less; } +export -f d p [ "$OS" = alpine ] && export MANPAGER='vim +MANPAGER --not-a-term' @@ -57,7 +59,7 @@ alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date alias apk='doas apk' alias dotfiles='git --git-dir=$HOME/dotfiles --work-tree=$HOME' alias dy='YAEGI_AST_DOT=1 YAEGI_CFG_DOT=1 ./yaegi' -alias f2fa='2fa -list | fzf | xargs 2fa -clip' +alias 2fz='2fa -list | fzf | xargs 2fa -clip' alias fd='find . -iname' alias gdt='dlv test -- -test.v -test.run' alias gob='go build' @@ -100,6 +102,7 @@ eval "$(fzf --bash)" >/dev/null # Handle missing commands, unless already provided. type -t command_not_found_handle >/dev/null || command_not_found_handle() { + local pkgs case $OS in (alpine) pkgs=$(apk list -Pq "cmd:$1" | awk '{print $2}') ;; (arch) pkgs=$(pkgfile -b "$1") ;; -- cgit v1.2.3