Files
wiki-js/sysadmin/bash-completion.html

21 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--
title: bash-completion автодополнение
description:
published: true
date: 2023-11-07T10:06:13.218Z
tags: bash, linux
editor: ckeditor
dateCreated: 2023-11-03T08:47:49.396Z
-->
<h3>Устанавливаем из официальных репозиториев</h3>
<p><code>apt install bash-completion</code></p>
<p>&nbsp;</p>
<h5><strong>Настройка автозаполнения Bash</strong></h5>
<p>Если все прошло успешно, то у вас должен появится файл <code><strong>bash_completion.sh</strong></code>. Он расположен в <code><strong>/etc/profile.d/</strong></code>&nbsp;</p>
<p>Чтобы убедиться в этом, выполните эту команду.</p>
<figure class="image image_resized" style="width:43.89%;"><img src="/image.png"></figure>
<p>Чтобы применить изменения и тем самым включить желаемое автозаполнение, нам требуется добавить несколько вещей в <code><strong>~/.bashrc</strong></code>.</p>
<p>Мы можем либо скопировать содержимое скрипта в конец упомянутого файла, либо просто перенести его в файл.</p>
<p><code>echo "source /etc/profile.d/bash_completion.sh" &gt;&gt; ~/.bashrc</code></p>