Patrick Tracanelli escreveu:
Entao (finalmente) vem a pergunta. Tem como eu fazer (alguma bruxaria no .cshrc) o (t)csh ignorar na busca pelo historico tudo que comecesse com uma palavra especifica, ou melhor o que esta no historico com essa palavra soh ser "buscado" os argumentos que vem depois dela, por exemplo no seguinte historico:
805 18:48 sudo apachectl start 806 18:49 sudo /usr/local/etc/rc.d/mysql-server.sh start 807 18:57 apachectl configtest 808 18:57 apachectl graceful 809 18:57 sudo apachectl graceful 810 19:05 history
Quando digitar /<seta p/ cima> aparecer o item 806 do historico?
Ou alguma forma mais inteligente de fazer isso?
Eu tentei varias coisas aqui, e nao consegui nada que fosse limpo e funcional. Algum (t)CSHell Guru pra dar ideias? :)
Não sou Guru mas costumo utilizar o "history-search-backward (M-p, M-P)" e "history-search-forward (M-n, M-N)". Bastaria digitar "sudo " e ir teclando "Alt-p" ate' chegar ao comando desejado.
history-search-backward (M-p, M-P)
Searches backwards through the history list for a command beginning with the current contents of the input buffer up to the cursor and copies it into the input buffer. The search string may be a glob-pattern (see Filename substitution) con- taining `*', `?', `[]' or `{}'. up-history and
down-history will proceed from the appropriate point in the history list.
Emacs mode only. See also history-search-forward and i- search-back.
history-search-forward (M-n, M-N) Like history-search-backward, but searches forward.
-- Alexandre
_______________________________________________________________ Para enviar um novo email para a lista: freebsd@fug.com.br Sair da Lista: http://mail.fug.com.br/mailman/listinfo/freebsd_fug.com.br Historico: http://www4.fugspbr.org/lista/html/FUG-BR/