feat: add bash shell utility functions
12 funciones Bash del dominio shell: utilidades de scripting (bash_log, bash_colors, bash_check_deps, bash_confirm, bash_handle_error, bash_safe_run), manipulacion de texto (convert_text_case), estructura de proyectos (create_project_structure), y operaciones git (git_clean_branches, git_log_visual, git_push_all_remotes, git_repo_status). Cada una con su .sh y .md de frontmatter.
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
---
|
||||
name: git_log_visual
|
||||
kind: function
|
||||
lang: bash
|
||||
domain: shell
|
||||
version: "1.0.0"
|
||||
purity: impure
|
||||
signature: "git_log_visual([--count N: int], [--author X: string], [--since D: string], [--all]) -> void"
|
||||
description: "Muestra el historial de commits Git con grafo visual, colores y formato legible (hash, fecha, autor, mensaje, ramas). Soporta filtros por cantidad, autor, fecha y modo todas-las-ramas. Pagina con less."
|
||||
tags: [bash, git, log, history, graph]
|
||||
uses_functions: []
|
||||
uses_types: []
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: []
|
||||
params:
|
||||
- name: --count
|
||||
desc: "número de commits a mostrar (default: 20)"
|
||||
- name: --author
|
||||
desc: "filtrar por nombre o email del autor (parcial, igual que git --author)"
|
||||
- name: --since
|
||||
desc: "mostrar solo commits desde esta fecha (ej: '1 week ago', '2025-01-01')"
|
||||
- name: --all
|
||||
desc: "incluir commits de todas las ramas, no solo la actual"
|
||||
output: "historial de commits paginado con less -R; exit code 1 si no es un repo Git"
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "bash/functions/shell/git_log_visual.sh"
|
||||
source_repo: "https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/egutierrez/DevLauncher.git"
|
||||
source_license: "MIT"
|
||||
source_file: "scripts/linux/git_utils/historial_commits.sh"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```bash
|
||||
source bash/functions/shell/git_log_visual.sh
|
||||
|
||||
# Últimos 20 commits (default)
|
||||
git_log_visual
|
||||
|
||||
# Últimos 50 commits de todas las ramas
|
||||
git_log_visual --count 50 --all
|
||||
|
||||
# Commits de un autor esta semana
|
||||
git_log_visual --author "lucas" --since "1 week ago"
|
||||
|
||||
# Commits de hoy en todas las ramas
|
||||
git_log_visual --since "00:00:00" --all --count 100
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
Usa `less -R --quit-if-one-screen` para paginar: si el log cabe en pantalla, no abre el paginador. El formato incluye hash corto (amarillo), fecha (cyan), autor (verde), mensaje y refs de ramas (rojo).
|
||||
Reference in New Issue
Block a user