added modular bash command-picker
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Command picker using fzf
|
||||
commands() {
|
||||
local cmd
|
||||
cmd=$(grep -vE '^[[:space:]]*#|^[[:space:]]*$' ~/.config/commands/linux.txt |
|
||||
fzf --height 50% --layout=reverse --border --prompt='Command: ')
|
||||
|
||||
if [[ -n "$cmd" ]]; then
|
||||
READLINE_LINE="$cmd"
|
||||
READLINE_POINT=${#READLINE_LINE}
|
||||
fi
|
||||
}
|
||||
|
||||
# Ctrl+G opens the command picker
|
||||
if [[ $- == *i* ]]; then
|
||||
bind -x '"\C-g": commands'
|
||||
fi
|
||||
@@ -0,0 +1,27 @@
|
||||
# ===== Proxmox =====
|
||||
pveversion -v
|
||||
qm list
|
||||
pct list
|
||||
pvesm status
|
||||
|
||||
# ===== Docker =====
|
||||
docker ps
|
||||
docker compose ps
|
||||
docker compose logs -f
|
||||
docker stats
|
||||
|
||||
# ===== Disk =====
|
||||
lsblk -f
|
||||
df -h
|
||||
du -sh *
|
||||
sudo smartctl -a /dev/sda
|
||||
|
||||
# ===== Network =====
|
||||
ip addr
|
||||
ip route
|
||||
ss -tulpn
|
||||
|
||||
# ===== Files =====
|
||||
ls -lah
|
||||
find . -maxdepth 2 -type f
|
||||
rsync -avh --progress SOURCE/ DEST/
|
||||
Reference in New Issue
Block a user