Giter Club home page Giter Club logo

Comments (3)

gperciva avatar gperciva commented on July 22, 2024

Huh. Bash doesn't look at any user-writeable bash-completion directories by default (at least, not on Ubuntu). Somebody could add their own custom user-writeable directory by copying a bunch of scripts around, but it's not trivial.

I've revised the configure script so it prints the directory during the configure process, which is a small step forward. Right now I see two options:

  1. assume that most people will be installing tarsnap with sudo. If somebody chooses to install with both --prefix= and --with-bash-completion-dir, we assume that they'll understand why make install fails.

  2. do some autoconf magic to check one or more of the following:

  • if $BASH_COMPLETION_DIR is in the same directory structure as ${prefix}, and give an error if it isn't. (assuming that the user can install to the same place as prefix)
  • if $BASH_COMPLETION_DIR has the same permissions as ${prefix}

I get the feeling that 2) is me inventing horrible solutions to a problem that doesn't exist (/ isn't serious), though. I mean, if I were in python, I'd totally whip up something that does those checks in 10 minutes. But trying to do such things in autoconf sounds like a recipe for masochism.

from tarsnap.

cperciva avatar cperciva commented on July 22, 2024

This is turned off by default, right? In that case I'm not too worried... people who turn it should understand what's going on. It may get turned on in packaging systems but the maintainers of those should figure out where to put the files.

from tarsnap.

gperciva avatar gperciva commented on July 22, 2024

Yes, --with-bash-completion-dir is disabled by default. And this is no problem for package maintainers, since packages will be installed as root. (or maybe as fake-root into a chroot, but that's also no problem in terms of writing to /usr/share/bash-completions/ )

from tarsnap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.