# Shell y entorno personal

Tu interfaz diaria con el sistema.

# OhMyZSH

Notas sueltas para no perder otra tarde intentando recordar cómo se activaba ‘ese plugin que me gustaba’.

# Mi entorno de shell con ZSH: configuración detallada

---
### Introducción

Configuración actual del `.zshrc` personalizada, pensada para tenerla a mano al instalar un nuevo sistema. Incluye tema, plugins y utilidades adicionales.

---

### Requisitos previos

* Tener `zsh` instalado y configurado como shell predeterminado.
* Instalar Oh My Zsh con:
  ```bash
  sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  ```
* Usar una terminal con **Nerd Font** o **Powerline Font** (por ejemplo, Fira Code con glifos).

---

### Configuración actual del `.zshrc`

```zsh
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"

# Set name of the theme to load.
ZSH_THEME="spaceship"

# Which plugins would you like to load?
plugins=(git zsh-interactive-cd zsh-autosuggestions zsh-syntax-highlighting)

# Source oh-my-zsh.
source "$ZSH/oh-my-zsh.sh"

# User configuration

# Preferred editor for local and remote sessions
# export EDITOR='vim'

fastfetch
```

---

### Qué hace cada cosa

#### Tema: `spaceship`
Tema minimalista pero completo. Muestra info útil (git, entorno, batería, jobs, etc.) sin recargar. Muy configurable. Requiere fuente con glifos.

Instalación:
```bash
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
```
Luego:
```zsh
ZSH_THEME="spaceship"
```

#### Plugin: `zsh-autosuggestions`
Sugiere comandos anteriores mientras se escribe.

Instalación:
```bash
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
```

#### Plugin: `zsh-syntax-highlighting`
Resalta la sintaxis al escribir. Útil para detectar errores antes de ejecutar.

Instalación:
```bash
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
```

#### Plugin: `zsh-interactive-cd`
Permite cambiar de directorio con un buscador interactivo usando `fzf`.

> Requiere tener `fzf` instalado desde la paquetería del sistema.

#### Plugin: `git`
Alias y funciones para trabajar con Git más fácilmente.

#### Comando: `fastfetch`
Muestra información del sistema al iniciar sesión (parecido a `neofetch` pero más moderno y rápido).

Instalación:
[Guía oficial de instalación de Fastfetch](https://github.com/fastfetch-cli/fastfetch?tab=readme-ov-file#installation)

---

### Resumen breve

* Tema: `spaceship`
* Plugins clave: `autosuggestions`, `syntax-highlighting`, `interactive-cd`
* Fuente con glifos necesaria
* Lanzar `fastfetch` al iniciar shell

---

### Notas personales

Usar esto como base cuando reinstale. Si algo falla, revisar compatibilidad de fuentes o si faltan dependencias (fzf, git, etc).

---

### Referencias

* [Gist de configuración de zshrc](https://gist.github.com/n1snt/454b879b8f0b7995740ae04c5fb5b7df)
* [Guía oficial de instalación de Fastfetch](https://github.com/fastfetch-cli/fastfetch?tab=readme-ov-file#installation)
* [Documentación de spaceship-prompt](https://spaceship-prompt.sh/getting-started/)