diff --git a/_posts/2014-01-14-about-zshrc.html b/_posts/2014-01-14-about-zshrc.html
index bbc4652..231bda8 100644
--- a/_posts/2014-01-14-about-zshrc.html
+++ b/_posts/2014-01-14-about-zshrc.html
@@ -407,13 +407,13 @@ pack () {
Here is a special function for su
:
{% highlight bash %}
su () {
- checksu=0
- for flags in $*; do
- if [[ $flags == "-" ]]; then
- checksu=1
- fi
+ CHECKSU=0
+ for FLAG in $*; do
+ [[ $FLAG == "-" ]] && CHECKSU=1
+ [[ $FLAG == "-l" ]] && CHECKSU=1
+ [[ $FLAG == "--login" ]] && CHECKSU=1
done
- if [[ $checksu == 0 ]]; then
+ if [[ $CHECKSU == 0 ]]; then
echo "Use 'su -', Luke"
/usr/bin/su - $*
else
diff --git a/ru/_posts/2014-01-14-about-zshrc.html b/ru/_posts/2014-01-14-about-zshrc.html
index acfca42..9b7fee8 100644
--- a/ru/_posts/2014-01-14-about-zshrc.html
+++ b/ru/_posts/2014-01-14-about-zshrc.html
@@ -407,13 +407,13 @@ pack () {
Специальная функция для su
:
{% highlight bash %}
su () {
- checksu=0
- for flags in $*; do
- if [[ $flags == "-" ]]; then
- checksu=1
- fi
+ CHECKSU=0
+ for FLAG in $*; do
+ [[ $FLAG == "-" ]] && CHECKSU=1
+ [[ $FLAG == "-l" ]] && CHECKSU=1
+ [[ $FLAG == "--login" ]] && CHECKSU=1
done
- if [[ $checksu == 0 ]]; then
+ if [[ $CHECKSU == 0 ]]; then
echo "Use 'su -', Luke"
/usr/bin/su - $*
else