Skip to content

Instantly share code, notes, and snippets.

@danilogco
Last active June 22, 2025 01:24
Show Gist options
  • Save danilogco/1d14fc344848411bde2fbcfc8e78f98d to your computer and use it in GitHub Desktop.
Save danilogco/1d14fc344848411bde2fbcfc8e78f98d to your computer and use it in GitHub Desktop.
Nano extensios > Linux Mint/Ubuntu
#!/bin/bash
NANORC="$HOME/.nanorc"
# Reseta o arquivo
> "$NANORC"
# Inclui a pasta principal (assumindo que sempre existe)
echo 'include "/usr/share/nano/*.nanorc"' >> "$NANORC"
# Inclui se existir
if [ -d "/usr/share/nano/extra" ]; then
echo 'include "/usr/share/nano/extra/*.nanorc"' >> "$NANORC"
fi
if [ -d "/usr/share/nano/debian" ]; then
echo 'include "/usr/share/nano/debian/*.nanorc"' >> "$NANORC"
fi
echo "Arquivo $NANORC resetado com includes existentes."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment