<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>22469</bug_id>
          
          <creation_ts>2009-12-07 17:36:32 +0300</creation_ts>
          <short_desc>[FR] add default global ls aliases</short_desc>
          <delta_ts>2018-04-27 17:55:28 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>zsh</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Shigorin">mike</reporter>
          <assigned_to name="Fr. Br. George">george</assigned_to>
          <cc>arseny</cc>
    
    <cc>at</cc>
    
    <cc>evg</cc>
    
    <cc>george</cc>
    
    <cc>grenka</cc>
    
    <cc>grizlik78</cc>
    
    <cc>mithraen</cc>
    
    <cc>real.altlinux.org</cc>
    
    <cc>swi</cc>
    
    <cc>viy</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103957</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2009-12-07 17:36:32 +0300</bug_when>
    <thetext>Предлагаю добавить в пакетный /etc/zshrc
alias l=&apos;ls -lapt&apos;      # Detailed listing, sorted by modification time.
alias ll=&apos;ls -laptc&apos;    # Detailed listing, sorted by change time.
(после исправления #14641 они больше не подбираются из /etc/bashrc.d/alias.sh, а удобны и думаю -- многим уже привычны)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106166</commentid>
    <comment_count>1</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2010-01-30 00:35:56 +0300</bug_when>
    <thetext>*** Bug 22859 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112445</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2010-09-21 14:51:28 +0400</bug_when>
    <thetext>Не понял, чего вы хотите.  В bash что-то не работает?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112449</commentid>
    <comment_count>3</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2010-09-21 15:00:57 +0400</bug_when>
    <thetext>zsh перестал читать /etc/bashrc.d/*, а люди хотят иметь изкоробочные алиасы как в bash.  bug 14641 comment 4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112452</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2010-09-21 15:04:56 +0400</bug_when>
    <thetext>(In reply to comment #3)
&gt; zsh перестал читать /etc/bashrc.d/*, а люди хотят иметь изкоробочные алиасы как
&gt; в bash.  bug 14641 comment 4

Чем пакет bash может помочь в этой ситуации пользователям пакета zsh?
Перенести в profile.d нельзя, zshrc вне компетенции bash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112454</commentid>
    <comment_count>5</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2010-09-21 15:10:10 +0400</bug_when>
    <thetext>(In reply to comment #4)
&gt; Чем пакет bash может помочь в этой ситуации пользователям пакета zsh?
&gt; Перенести в profile.d нельзя, zshrc вне компетенции bash.

Я ничего не понял что ты имел в виду этими бессвязными фразами.  Перечитай ещё раз bug 14641 comment 4 и заголовок баги, это будет ответом на твой вопрос.  И обясни нам, невежественным пользователям, по какой же такой выдуманной причине &quot;Перенести в profile.d нельзя&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112462</commentid>
    <comment_count>6</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2010-09-21 15:58:27 +0400</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; Чем пакет bash может помочь в этой ситуации пользователям пакета zsh?
&gt; &gt; Перенести в profile.d нельзя, zshrc вне компетенции bash.
&gt; 
&gt; Я ничего не понял что ты имел в виду этими бессвязными фразами.  Перечитай ещё
&gt; раз bug 14641 comment 4 и заголовок баги, это будет ответом на твой вопрос.

Перечитал.  Там о другом.

&gt; И обясни нам, невежественным пользователям, по какой же такой выдуманной
&gt; причине &quot;Перенести в profile.d нельзя&quot;.

Семантика bashrc.d и profile.d существенным образом отличается:
$ (alias foo=bash; bash -c &apos;alias foo&apos;)
bash: line 0: alias: foo: не найден</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112466</commentid>
    <comment_count>7</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2010-09-21 16:08:16 +0400</bug_when>
    <thetext>(In reply to comment #6)
&gt; Семантика bashrc.d и profile.d существенным образом отличается:
&gt; $ (alias foo=bash; bash -c &apos;alias foo&apos;)
&gt; bash: line 0: alias: foo: не найден

Перечитал.  Там о другом.

Бага будет висеть в состоянии NEW до тек пор, пока не изменится эта мифическая &quot;семантика&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112468</commentid>
    <comment_count>8</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2010-09-21 16:18:00 +0400</bug_when>
    <thetext>Перемещение /etc/bashrc.d/alias.sh в /etc/profile.d/ невозможно.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112481</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2010-09-21 18:36:27 +0400</bug_when>
    <thetext>(In reply to comment #7)
&gt; &gt; Семантика bashrc.d и profile.d существенным образом отличается:
&gt; Бага будет висеть в состоянии NEW до тек пор, пока не изменится эта мифическая
&gt; &quot;семантика&quot;?
Она не мифическая, сталкивался -- перечитываю bash(1):

INVOCATION
[...]
       When bash is invoked as an interactive login shell, or as a  non-inter
       active  shell with the --login option, it first reads and executes com
       mands from the file /etc/profile, if that file exists.   After  reading
       that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
       in that order, and reads and executes commands from the first one  that
       exists  and  is  readable.  The --noprofile option may be used when the
       shell is started to inhibit this behavior.
[...]
       When  an  interactive  shell that is not a login shell is started, bash
       reads and executes commands from ~/.bashrc, if that file exists.   This
       may  be inhibited by using the --norc option.  The --rcfile file option
       will force bash to read and  execute  commands  from  file  instead  of
       ~/.bashrc.

На это накладывается:

--- /etc/skel/.bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
---

и 

--- /etc/skel/.bashrc
# Source global definitions
if [ -r /etc/bashrc ]; then
        . /etc/bashrc
fi
---

Таким образом,
- интерактивный bash в качестве login shell проинтерпретирует при запуске
  и *profile*, и *bashrc*;
- интерактивный bash не как login shell -- только *bashrc*.

Если перенести файлик, то алиасы будут зацепляться только login shell&apos;ом, гругря.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112482</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2010-09-21 18:43:54 +0400</bug_when>
    <thetext>А ещё всё-таки предлагаю объявить в zsh нэзалэжнисть от алиасов в bash -- возможно, получится и получше наборчик выкроить (например, с df -h -x tmpfs вместо археологического упоминания supermount).

Есть такое наблюдение, что привычки у пользователей bash и zsh со временем заметно различаются...

У меня сейчас:

alias l=&apos;/bin/ls -l --color=tty&apos;
alias sdr=&apos;screen -dr&apos;
alias df=&apos;df -h -x nfs&apos;
export GREP_OPTIONS=&apos;--color=auto&apos; GREP_COLOR=&apos;1;32&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112483</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2010-09-21 19:46:30 +0400</bug_when>
    <thetext>Да, и верну-ка исходное Summary да перевешу на nobody@, по факту.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128415</commentid>
    <comment_count>12</comment_count>
    <who name="Fr. Br. George">george</who>
    <bug_when>2012-01-20 16:33:43 +0400</bug_when>
    <thetext>Я так понимаю смысл баги, что сейчас в zsh вообще никакие zsh-специфические алиасы из коробки не хватаются? Это нехорошо. Стоит, однако, обсудить, какие они должны быть. Меня, например, alias rm=&apos;rm -i&apos; бесит невообразимо.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128427</commentid>
    <comment_count>13</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2012-01-21 11:58:39 +0400</bug_when>
    <thetext>(In reply to comment #12)
&gt; Меня, например, alias rm=&apos;rm -i&apos; бесит невообразимо.
У меня он лет десять как unalias, но это ооочень неприятный момент про ожидания.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170691</commentid>
    <comment_count>14</comment_count>
    <who name="Grigory Ustinov">grenka</who>
    <bug_when>2018-04-27 17:55:28 +0300</bug_when>
    <thetext>Прошу добавить ещё --color=auto к алиасам. Раскраска ускоряет грепанье глазами в разы.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>