Markers & Jump : des raccourcis en bash - commentaires Markers & Jump : des raccourcis en bash 2018-11-27T13:06:35Z https://blog.roxing.net/markers-jump-des-raccourcis-en-bash#comment2656 2018-11-27T13:06:35Z <p>Pour l'auto completion à inserer à la suite du .bash_aliases</p> <div class="coloration_code cadre"><div class="spip_bash cadre"><div class="bash"><ol><li style="font-weight: normal; vertical-align:top;"><div style=""><span style="color: #666666; font-style: italic;"># autocomplete </span></div></li> <li style="font-weight: normal; vertical-align:top;"><div style="">_jump<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">{</span></div></li> <li style="font-weight: normal; vertical-align:top;"><div style=""> <span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #007800;">cur</span>=<span style="color: #800000;">${COMP_WORDS[COMP_CWORD]}</span></div></li> <li style="font-weight: normal; vertical-align:top;"><div style=""> <span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #007800;">lst</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-1</span> <span style="color: #007800;">$MARKPATH</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></div></li> <li style="font-weight: normal; vertical-align:top;"><div style=""> <span style="color: #007800;">COMPREPLY</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">compgen</span> <span style="color: #660033;">-W</span> <span style="color: #ff0000;">"<span style="color: #007800;">${lst}</span>"</span><span style="color: #800000;">${cur}</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span></div></li> <li style="font-weight: normal; vertical-align:top;"><div style=""><span style="color: #7a0874; font-weight: bold;">}</span></div></li> <li style="font-weight: normal; vertical-align:top;"><div style=""><span style="color: #7a0874; font-weight: bold;">complete</span> <span style="color: #660033;">-F</span> _jump jump </div></li> </ol></div></div><p class="download cadre_download"><a href='https://blog.roxing.net/sites/blog.roxing.net/local/cache-code/9a632ae23bde010c2151507eab40fcdc.txt' rel='nofollow'>Télécharger</a></p></div> Markers & Jump : des raccourcis en bash 2015-08-29T12:05:40Z https://blog.roxing.net/markers-jump-des-raccourcis-en-bash#comment275 2015-08-29T12:05:40Z <p>Adopté ! très pratique.</p>