userprofiles zu bashprofiles umbenannt und vollständig dokumentiert
- Verzeichnis userprofiles/ → bashprofiles/ umbenannt - .gitignore auf neue Pfadstruktur angepasst - Umfassendes bashprofiles/README.md mit Installation und Anpassungen - bashprofiles als eigene Kategorie in main README integriert - How-To Anleitung um bashprofiles erweitert Die bashprofiles enthalten optimierte Bash-Konfigurationen mit erweiterter History, modularer Struktur und Performance-Optimierungen für Support-Umgebungen. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
# Bash-Profile
|
||||
|
||||
Sammlung von optimierten Bash-Konfigurationen für verschiedene easyname Support-Umgebungen.
|
||||
|
||||
---
|
||||
|
||||
## Inhaltsverzeichnis
|
||||
|
||||
- [Übersicht](#übersicht)
|
||||
- [Enthaltene Profile](#enthaltene-profile)
|
||||
- [Installation](#installation)
|
||||
- [Anpassungen](#anpassungen)
|
||||
- [Lizenz / Sichtbarkeit](#lizenz--sichtbarkeit)
|
||||
|
||||
---
|
||||
|
||||
## Übersicht
|
||||
|
||||
Die Bash-Profile enthalten optimierte Konfigurationen für verschiedene Arbeitsumgebungen im easyname Support. Jedes Profil ist auf spezielle Anforderungen zugeschnitten und kann als Basis für eigene Anpassungen verwendet werden.
|
||||
|
||||
**Features:**
|
||||
- Erweiterte History-Konfiguration mit Timestamps
|
||||
- Optimierte Prompts mit Farben und Kontextinformationen
|
||||
- Modulare Struktur durch ausgelagerte Dateien
|
||||
- Bash-Completion und dircolors Support
|
||||
|
||||
---
|
||||
|
||||
## Enthaltene Profile
|
||||
|
||||
### [`pl`](./pl)
|
||||
Basis-Profil mit sauberer, optimierter .bashrc-Konfiguration.
|
||||
|
||||
**Highlights:**
|
||||
- **History**: Unbegrenzte History mit Timestamps und Duplikat-Vermeidung
|
||||
- **Prompt**: Farbiger Prompt mit User@Host und Pfad-Anzeige
|
||||
- **Modularität**: Ausgelagerte Konfiguration in separate Dateien:
|
||||
- `~/.bash_aliases` - Aliase und Shortcuts
|
||||
- `~/.bash_env` - Umgebungsvariablen
|
||||
- `~/.bash_paths` - PATH-Erweiterungen
|
||||
- **Kompatibilität**: Funktioniert mit allen Standard-Bash-Umgebungen
|
||||
- **Performance**: Effiziente Konfiguration ohne Overhead
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
### Komplettes Profil übernehmen
|
||||
```bash
|
||||
# Backup der aktuellen .bashrc
|
||||
cp ~/.bashrc ~/.bashrc.backup
|
||||
|
||||
# Profil kopieren
|
||||
cp bashprofiles/pl/.bashrc ~/.bashrc
|
||||
|
||||
# Reload der Bash-Konfiguration
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
### Einzelne Teile übernehmen
|
||||
```bash
|
||||
# Nur History-Optimierungen
|
||||
grep -A 10 "##### History #####" bashprofiles/pl/.bashrc >> ~/.bashrc
|
||||
|
||||
# Nur Prompt-Konfiguration
|
||||
grep -A 15 "##### Prompt #####" bashprofiles/pl/.bashrc >> ~/.bashrc
|
||||
```
|
||||
|
||||
### Modulare Dateien erstellen
|
||||
```bash
|
||||
# Erstelle ausgelagerte Konfigurationsdateien
|
||||
touch ~/.bash_aliases
|
||||
touch ~/.bash_env
|
||||
touch ~/.bash_paths
|
||||
|
||||
# Beispiel für ~/.bash_env (LUSER für go-Tool)
|
||||
echo 'export LUSER="deinusername"' >> ~/.bash_env
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Anpassungen
|
||||
|
||||
### Eigenes Profil erstellen
|
||||
1. **Ordner erstellen**:
|
||||
```bash
|
||||
mkdir bashprofiles/<username>
|
||||
```
|
||||
|
||||
2. **Profile anpassen**:
|
||||
```bash
|
||||
cp bashprofiles/pl/.bashrc bashprofiles/<username>/.bashrc
|
||||
# Anpassungen vornehmen
|
||||
```
|
||||
|
||||
3. **Dokumentation**:
|
||||
```bash
|
||||
cp bashprofiles/pl/README.md bashprofiles/<username>/README.md
|
||||
# README anpassen
|
||||
```
|
||||
|
||||
### Häufige Anpassungen
|
||||
- **LUSER Variable**: In `~/.bash_env` für go-Tool setzen
|
||||
- **Aliases**: Häufig verwendete Befehle in `~/.bash_aliases`
|
||||
- **Prompt**: Farben oder Format in PS1 anpassen
|
||||
- **History**: HISTSIZE nach Bedarf erhöhen/verringern
|
||||
|
||||
---
|
||||
|
||||
## Lizenz / Sichtbarkeit
|
||||
|
||||
> Dieses Repository ist **intern** für easyname Support.
|
||||
> Falls eine Freigabe nach extern geplant ist, bitte vorab mit Teamleitung abklären.
|
||||
|
||||
---
|
||||
|
||||
*Diese Profile wurden mit Hilfe von Claude Code erstellt.*
|
||||
@@ -0,0 +1,26 @@
|
||||
### CUSTOM ALIASES BASH FILE ###
|
||||
|
||||
# Schutz vor versehentlichem Überschreiben
|
||||
alias cp='cp -i'
|
||||
alias mv='mv -i'
|
||||
alias rm='rm -i'
|
||||
|
||||
# Navigation
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
|
||||
# Komfort
|
||||
alias grep='grep --color=auto'
|
||||
alias df='df -h'
|
||||
alias free='free -m'
|
||||
|
||||
# Netzwerk-Shortcuts
|
||||
alias ip4='ip -4 -brief addr'
|
||||
alias ip6='ip -6 -brief addr'
|
||||
alias myip='curl -s https://ifconfig.me || true'
|
||||
|
||||
# LS Aliase
|
||||
alias ls='ls --color=auto'
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
@@ -0,0 +1,13 @@
|
||||
### CUSTOM ENV BASH FILE ###
|
||||
|
||||
# Standard-User für interne Tools
|
||||
export LUSER="${LUSER:-pljubeko}"
|
||||
|
||||
# sinnvolle Defaults
|
||||
export EDITOR="${EDITOR:-nano}"
|
||||
export PAGER="${PAGER:-less}"
|
||||
export LESSHISTFILE=-
|
||||
export GPG_TTY=$(tty 2>/dev/null || true)
|
||||
|
||||
# LS Optionen (wird von ls-Alias genutzt)
|
||||
export LS_OPTIONS='--color=auto -h'
|
||||
@@ -0,0 +1,18 @@
|
||||
### CUSTOM PATH BASH FILE ###
|
||||
|
||||
# ~/bin und ~/.local/bin vorne anhängen, falls vorhanden
|
||||
if [ -d "$HOME/bin" ]; then
|
||||
case ":$PATH:" in
|
||||
*":$HOME/bin:"*) : ;;
|
||||
*) PATH="$HOME/bin:$PATH" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -d "$HOME/.local/bin" ]; then
|
||||
case ":$PATH:" in
|
||||
*":$HOME/.local/bin:"*) : ;;
|
||||
*) PATH="$HOME/.local/bin:$PATH" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
export PATH
|
||||
@@ -0,0 +1,66 @@
|
||||
# CLEANED UPDATED BASHRC
|
||||
# ~/.bashrc — interactive non-login shells
|
||||
|
||||
# Exit early if non-interactive
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
##### History #####
|
||||
HISTCONTROL=ignoreboth:erasedups
|
||||
shopt -s histappend
|
||||
HISTSIZE=99999999
|
||||
HISTFILESIZE=99999999
|
||||
HISTTIMEFORMAT="%Y-%m-%d %T "
|
||||
PROMPT_COMMAND='history -a; history -n'
|
||||
shopt -s cmdhist
|
||||
shopt -s lithist
|
||||
shopt -s checkwinsize
|
||||
|
||||
##### Debian chroot prompt helper #####
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
##### Prompt #####
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >/dev/null 2>&1; then
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'
|
||||
else
|
||||
PS1='\u@\h \w \$ '
|
||||
fi
|
||||
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
esac
|
||||
|
||||
##### LS-Farben & dircolors #####
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
if [ -r "$HOME/.dircolors" ]; then
|
||||
eval "$(dircolors -b "$HOME/.dircolors")"
|
||||
else
|
||||
eval "$(dircolors -b)"
|
||||
fi
|
||||
fi
|
||||
|
||||
##### Bash-Completion #####
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
##### Ausgelagerte Dateien #####
|
||||
[ -f "$HOME/.bash_aliases" ] && . "$HOME/.bash_aliases"
|
||||
[ -f "$HOME/.bash_env" ] && . "$HOME/.bash_env"
|
||||
[ -f "$HOME/.bash_paths" ] && . "$HOME/.bash_paths"
|
||||
Reference in New Issue
Block a user