diff options
| author | Marc Vertes <mvertes@free.fr> | 2025-07-06 18:09:06 +0200 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2025-07-06 18:09:06 +0200 |
| commit | 9ac115e05f82ebb2a8998f91a32d8efdac6c659d (patch) | |
| tree | 891209f4b1a5377875968eb087b2362abf99c833 /.bashrc | |
| parent | cd3dfb2203f091d7781fac890e039eb5ca10ade1 (diff) | |
update
Diffstat (limited to '.bashrc')
| -rw-r--r-- | .bashrc | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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") ;; |
