mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
14 lines
No EOL
175 B
Bash
14 lines
No EOL
175 B
Bash
|
|
# Nano
|
|
# Sudo nano if files are not writeable for current user
|
|
|
|
alias nano='nano'
|
|
|
|
function nano () {
|
|
if [[ (-G $1) || (-O $1) ]]
|
|
then
|
|
nano $1
|
|
else
|
|
sudo nano $1
|
|
fi
|
|
} |