Spacc BBS Spacc BBS
    • Categorie
    • Recenti
    • Tag
    • Popolare
    • Mondo
    • Utenti
    • Gruppi
    • Registrati
    • Accedi
    La nuova BBS è in fase Alpha. I post precedenti al 22 luglio 2024 potrebbero non essere trasferibili, ma rimarranno disponibili per la lettura su /old/.

    i have an environment variable called tmp that has an absolute path to a directory in it (it's a temporary directory for me to throw things into whenever i please, for other machines on the network to see)

    Pianificato Fissato Bloccato Spostato Uncategorized
    5 Post 2 Autori 0 Visualizzazioni
    Caricamento altri post
    • Da Vecchi a Nuovi
    • Da Nuovi a Vecchi
    • Più Voti
    Rispondi
    • Topic risposta
    Effettua l'accesso per rispondere
    Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
    • monorail@glaceon.socialM Questo utente è esterno a questo forum
      monorail@glaceon.social
      ultima modifica di

      i have an environment variable called tmp that has an absolute path to a directory in it (it's a temporary directory for me to throw things into whenever i please, for other machines on the network to see)

      inside the directory that it points at are a bunch of files, i'll choose tsduck-output.pcap completely arbitrarily for this example. i can do something like ls $tmp/tsduck-output.pcap and that works completely fine

      i want tab completion to work with this environment variable, and it kind of does, but not quite

      if i type in ls $tmp/ts and hit tab, the line completes to ls \$tmp/tsduck-output.pcap. so, bash does see that i'm accessing a path under that directory, and it does know to look under that directory to find what names to tab complete to. but also, for some reason, it thinks i want the literal dollar sign at the beginning, so it inserts the backslash and stops the path from working

      is there some configuration thing i can do so it doesn't put the backslash before $tmp?

      steffo@a.junimo.partyS 1 Risposta Ultima Risposta Rispondi Cita 0
      • steffo@a.junimo.partyS Questo utente è esterno a questo forum
        steffo@a.junimo.party @monorail@glaceon.social
        ultima modifica di steffo@a.junimo.party

        @monorail what shell are you using?

        monorail@glaceon.socialM 1 Risposta Ultima Risposta Rispondi Cita 0
        • monorail@glaceon.socialM Questo utente è esterno a questo forum
          monorail@glaceon.social @steffo@a.junimo.party
          ultima modifica di

          @steffo bash

          steffo@a.junimo.partyS 1 Risposta Ultima Risposta Rispondi Cita 0
          • steffo@a.junimo.partyS Questo utente è esterno a questo forum
            steffo@a.junimo.party @monorail@glaceon.social
            ultima modifica di

            @monorail

            hmm, i'm not super familiar with bash

            i tried to reproduce the behavior with $HOME but i didn't get a backslash added, so i couldn't test it myself

            but maybe the direxpand shopt is what you're looking for?

            https://man.archlinux.org/man/core/bash/bash.1.en#direxpand

            steffo@a.junimo.partyS 1 Risposta Ultima Risposta Rispondi Cita 0
            • steffo@a.junimo.partyS Questo utente è esterno a questo forum
              steffo@a.junimo.party @steffo@a.junimo.party
              ultima modifica di

              @monorail ...do you have a directory named $tmp in your home?

              1 Risposta Ultima Risposta Rispondi Cita 0
              • Primo post
                Ultimo post