From mboxrd@z Thu Jan 1 00:00:00 1970 From: Meiyo Peng Subject: bug#27206: Fish: figure out a solution for the vendor path extension to fish Date: Mon, 07 Jan 2019 11:45:50 +0800 Message-ID: <8736q5ruz5.fsf@gmail.com> References: <20170603104140.2veed6frwdhdhfhk@abyayala> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:33675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggLsV-0006ga-IH for bug-guix@gnu.org; Sun, 06 Jan 2019 22:47:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggLsU-00028V-Ib for bug-guix@gnu.org; Sun, 06 Jan 2019 22:47:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48245) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ggLsU-00028O-F7 for bug-guix@gnu.org; Sun, 06 Jan 2019 22:47:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ggLsU-0002hp-2D for bug-guix@gnu.org; Sun, 06 Jan 2019 22:47:02 -0500 In-Reply-To: <20170603104140.2veed6frwdhdhfhk@abyayala> Sender: "Debbugs-submit" Resent-Message-ID: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: ng0@n0.is Cc: 27206@debbugs.gnu.org Hi, > Fish doesn't pick up stuff like 'fish-guix' from store > without modifications to the path where fish searches > for vendor or sysadmin installed systemwide 'things' > for fish. I found this old thread after submitting patch #34003. I think that patch has probably solved your problem. I submitted patch #34003 to update fish to 3.0.0. In that patch, I enabled fish to add user's and system's profiles to __extra_* variables. So now fish can load completions and functions from user's and system's profiles. $fish_complete_path and $fish_function_path become this on my computer: #+begin_example ~ echo $fish_complete_path | tr ' ' '\n' /home/meiyo/.config/fish/completions /gnu/store/nd3lkiyz144rwvlhvx9adxhngd5xy16f-fish-3.0.0/etc/fish/completio= ns /home/meiyo/.guix-profile/etc/fish/completions /run/current-system/profile/etc/fish/completions /home/meiyo/.guix-profile/share/fish/vendor_completions.d /run/current-system/profile/share/fish/vendor_completions.d /gnu/store/nd3lkiyz144rwvlhvx9adxhngd5xy16f-fish-3.0.0/share/fish/vendor_= completions.d /gnu/store/nd3lkiyz144rwvlhvx9adxhngd5xy16f-fish-3.0.0/share/fish/complet= ions /home/meiyo/.local/share/fish/generated_completions ~ echo $fish_function_path | tr ' ' '\n' /home/meiyo/.config/fish/functions /gnu/store/nd3lkiyz144rwvlhvx9adxhngd5xy16f-fish-3.0.0/etc/fish/functions /home/meiyo/.guix-profile/etc/fish/functions /run/current-system/profile/etc/fish/functions /home/meiyo/.guix-profile/share/fish/vendor_functions.d /run/current-system/profile/share/fish/vendor_functions.d /gnu/store/nd3lkiyz144rwvlhvx9adxhngd5xy16f-fish-3.0.0/share/fish/vendor_= functions.d /gnu/store/nd3lkiyz144rwvlhvx9adxhngd5xy16f-fish-3.0.0/share/fish/functio= ns #+end_example We can then install fish completions and functions into either user's or system's profile. And fish will happily load them. For example, youtube-dl provides a fish completion: #+begin_example /gnu/store/3sv0ckhpyrxcssrk21s70klw14dz7x1b-youtube-dl-2018.12.17/etc/fish =E2=94=94=E2=94=80=E2=94=80 completions =E2=94=94=E2=94=80=E2=94=80 youtube-dl.fish #+end_example After installing youtube-dl into my user profile, youtube-dl command completion works in fish: #+begin_example ~ youtube-dl -- --abort-on-error (Abort downloading of further videos=E2=80=A6) --abort-on-unavailable-fragment (Abort downloading wh=E2=80=A6) --add-header (Specify a custom HTTP header and its va=E2=80=A6) --add-metadata (Write metadata to the video file) =E2=80=A6and 159 more rows #+end_example youtube-dl is now in my user profile: #+begin_example /home/meiyo/.guix-profile/etc/fish/ =E2=94=94=E2=94=80=E2=94=80 completions =E2=94=94=E2=94=80=E2=94=80 youtube-dl.fish #+end_example > I have many more fish packages in a branch which > I want to get into guix, but they are stuck because > of this. Help welcome, otherwise I'll promise to > fix it one day. You can share your packages with us now! -- Meiyo Peng https://www.pengmeiyu.com/