mirror of
https://github.com/arcan1s/dotfiles.git
synced 2025-07-14 22:35:48 +00:00
rename files to zsh
This commit is contained in:
15
zsh/custom_su.zsh
Normal file
15
zsh/custom_su.zsh
Normal file
@ -0,0 +1,15 @@
|
||||
# redefine su command
|
||||
su() {
|
||||
local CHECKSU=0
|
||||
for FLAG in $*; do
|
||||
[[ ${FLAG} == "-" ]] && CHECKSU=1
|
||||
[[ ${FLAG} == "-l" ]] && CHECKSU=1
|
||||
[[ ${FLAG} == "--login" ]] && CHECKSU=1
|
||||
done
|
||||
if [[ ${CHECKSU} == 0 ]]; then
|
||||
echo "Use 'su -', Luke"
|
||||
/bin/su - $*
|
||||
else
|
||||
/bin/su $*
|
||||
fi
|
||||
}
|
Reference in New Issue
Block a user