Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Error on new shells #138

Copy link
Copy link
@darrenmeehan

Description

@darrenmeehan
Issue body actions

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
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.