diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2015-09-25 13:22:09 +0200 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2015-09-25 13:37:39 +0200 |
commit | d591cebf4463e42569400bbcbaba5e16dcad734b (patch) | |
tree | cf38559cdc498291b4b0d077462c62861c709e3b /share/functions/__fish_print_pacman_repos.fish | |
parent | 8abb19aaca21f1a6b0d422f8f16ab11e38389f58 (diff) |
Introduce __fish_print_pacman_repos helper
This is used in at least 4 places, all of which have a bug in that they
print "options" as a valid repo. It seems better to fix it once,
especially given that there are tons of AUR helpers and pacman wrappers,
all of which might need this info.
Diffstat (limited to 'share/functions/__fish_print_pacman_repos.fish')
-rw-r--r-- | share/functions/__fish_print_pacman_repos.fish | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/share/functions/__fish_print_pacman_repos.fish b/share/functions/__fish_print_pacman_repos.fish new file mode 100644 index 00000000..81fe3de5 --- /dev/null +++ b/share/functions/__fish_print_pacman_repos.fish @@ -0,0 +1,3 @@ +function __fish_print_pacman_repos --description "Print the repositories configured for arch's pacman package manager" + sed -n -e 's/\[\(.\+\)\]/\1/p' /etc/pacman.conf | grep -v "#\|options" +end |