1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-12-22 14:54:23 +00:00

Create svim

This commit is contained in:
Steffo 2020-08-31 00:16:28 +02:00
parent cc38b5936d
commit ac2fa41326

5
functions/svim.fish Normal file
View file

@ -0,0 +1,5 @@
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