Error on new shells

オープン
#138 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
bash, python
領域
cli

調査の方向性

Start by reading etc/bash_completion.d/apt-linux-mint and checking how its have helper is provided when a new shell loads the completion file. The report includes a local guard for missing apt; verify the behavior on a fresh system and check whether the required dependency makes that guard appropriate. Done means new shells no longer print the reported error in the relevant environment, with completion still working when apt is installed.

索引モデルが issue の本文から書いたものです。

説明

When creating a new shell I get the following error in my terminal.
I've tracked it down to etc/bash_completion.d/apt-linux-mint which this repository. I'm using version 8.5.8

Command 'have' not found, did you mean:
  command 'dave' from deb libhttp-dav-perl (0.49-2)
  command 'haxe' from deb haxe (1:4.2.4-1build1)
  command 'save' from deb atfs (1.4pl6-15)
  command 'havp' from deb havp (0.93-2build1)
Try: sudo apt install <deb name>
$ 

I'm not quite sure what fix to make for this, I've patched my own system. But I am unsure if there's anything not obvious. I assume this problem would be happening to a lot of people if it was an issue.. I've been experimenting with Nix's home-manager on my system so it's tainted.

Should this script be able to assume that apt is installed. It's marked as a required dependency.

I've applied this patch to my own version locally. If I get time, I'll investigate on a fresh system.

mac@mac-MacBookPro:~/code/mintsystem$ git diff -u
diff --git a/etc/bash_completion.d/apt-linux-mint b/etc/bash_completion.d/apt-linux-mint
index 524eed5..5c84cc8 100644
--- a/etc/bash_completion.d/apt-linux-mint
+++ b/etc/bash_completion.d/apt-linux-mint
@@ -2,7 +2,9 @@
 # Bash completion file for Linux Mint apt utility.
 #
 
-have apt &&
+if ! command -v apt &> /dev/null; then
+    return 1
+fi
 _apt()
 {
     local cur opt
主要言語
Python
スター
58
フォーク
43
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/mintsystem のほかの issue

linuxmint/mintsystem の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。