
Eu estava pesquisando history
em um servidor e vi meu colega de trabalho usar o view
comando em um arquivo.
O melhor que posso dizer é que ele olha para você $EDITOR
e abre o arquivo com ele.
Quero saber mais sobre como funciona, mas está sendo difícil. Usar man
ou info
on view
apenas retorna a página de ajuda do seu arquivo $EDITOR
. Não tem uma help
página e pesquisá-la no Google é obviamente difícil.
Qualquer ideia?
Responder1
Usar man view
um é direcionado para a página de manual do vim
. Dentro encontrei isto:
view Start in read-only mode. You will be protected from writing the files. Can also be done with the "-R" argument.
Responder2
Achei a resposta no meu sistema interessante. Começando com:
type view
view is /usr/bin/view
Então, o que é isso?
file /usr/bin/view
/usr/bin/view: symbolic link to /etc/alternatives/view
file /etc/alternatives/view
/etc/alternatives/view: symbolic link to /usr/bin/vim.basic
Então, no final (pelo menos em sistemas baseados em Ubuntu), é um link simbólico gerenciado por update-alternatives
.
update-alternatives --config view
There are 2 choices for the alternative view (providing /usr/bin/view).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/vim.basic 30 auto mode
1 /usr/bin/vim.basic 30 manual mode
2 /usr/bin/vim.tiny 10 manual mode
Press <enter> to keep the current choice[*], or type selection number: