mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 23:04:22 +00:00
6 lines
221 B
Fish
6 lines
221 B
Fish
|
function svim --wraps='sudo -u (stat -c "%U" $1) vim $1' --description 'alias svim sudo -u (stat -c "%U" $1) vim $1'
|
||
|
set -l owner (stat -c "%U" $argv[1])
|
||
|
echo "File owner: $owner"
|
||
|
sudo -u $owner vim $argv
|
||
|
end
|