Compare commits

..

No commits in common. 'master' and 'v7' have entirely different histories.
master ... v7

@ -1,56 +0,0 @@
name: Build
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-latest
fish:
- stock
- 2
- 3
- brew
exclude:
- os: ubuntu-20.04
fish: 2
- os: ubuntu-latest
fish: 2
include:
- os: macos-latest
fish: brew
- os: macos-11
fish: brew
- os: macos-12
fish: brew
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Add brew to path for Ubuntu
if: startsWith(matrix.os, 'ubuntu') && matrix.fish == 'brew'
run: |
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
echo "/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
- name: Install Fish
run: FISH_RELEASE=${{ matrix.fish }} tools/ci-install-fish.sh
- name: Install Oh My Fish!
run: fish bin/install --verbose --offline --noninteractive --yes
- name: Run tests
run: |
tests/run.fish
pushd pkg/fish-spec; fish -c 'fish-spec'; popd
pushd pkg/omf; fish -c 'fish-spec'; popd

@ -0,0 +1,43 @@
language: c
dist: trusty
os:
- linux
- osx
addons:
apt:
packages:
- bc
- doxygen
- expect
- gettext
- libncurses5-dev
- tree
before_install:
- tools/travis-install-git.sh
- source tools/travis-github-pr-integration.sh
- tools/travis-install-fish.sh
before_script:
- tree -h
- export
- pushd bin; sha256sum -c install.sha256; popd
- fish $TRAVIS_BUILD_DIR/bin/install --verbose --offline --noninteractive --yes
script:
- tests/run.fish
- pushd pkg/fish-spec; fish -c 'fish-spec'; popd
- pushd pkg/omf; fish -c 'fish-spec'; popd
after_failure:
- pwd
- cd ~/.config/fish; tree -h; find . -type f | xargs cat
notifications:
email:
on_success: never
on_failure: change
slack:
secure: fHR34H901zaBpUdm9BECQfocnPki8HdigH9CQxopvJ6Rm0WCLzCst4zPESAlO/Jb1t6OYtU6Goqmdq3yqzo8+moCrygrpMUtzIel/TDhkLzC2SIlmMdnw2/Xdwzisd/8QBVwu9ns8xJ2C4eegolNazNsc1Ow/wULaLwA7vUJrfcSmvYBepfe3MPSX/KLU3BBRhiTr3RhuzV+D1qQcSrAiWGVr4zWUiRAar6WD1D4athZO9OX33upBYpraGEa3sRWrUJjVv7KWMH566Y2MSAtd0NBgsF9dn3S5nKTXtfyGXt2gkykZ9Ag1B7B9AR9BHpn5UcvDdn7FZpEREfrllkDU8iG67RD7owyRl/T5jyWQecU2Q9Rlco5esEpbkY7sXmzwj2RVBGzsaVjxajZ+C7Ns2ogMcP8o+xqfcUASXjlJM2kJQRSenwx82Vq6uQ0vbhgKWBTQE1qsEkLDCthUxQ9eJ0/exoBp95wrZinilmEyps00oqmS40HEhB+JmuN2sGVWhpSczVDvVmdV+XSewLqfRnWtr2yhL8dR1sfVm2lJh3Dzik4BFUASByeBJnViU4dDilLlb4S3Dwk0XZh9HGwLs9ujNA3PT23uoRu4VRBQkIwXZE8v/qvf4/7w8IowofzezYcjwxkaqu1hNgTKNOkbgopV9RdwrUxy4f53S0l2jY=

@ -247,7 +247,6 @@ Thanks to the people who contributed to this release.
[4]: https://github.com/oh-my-fish/oh-my-fish/releases/tag/v4
[5]: https://github.com/oh-my-fish/oh-my-fish/releases/tag/v5
[6]: https://github.com/oh-my-fish/oh-my-fish/releases/tag/v6
[7]: https://github.com/oh-my-fish/oh-my-fish/releases/tag/v7
[#191]: https://github.com/oh-my-fish/oh-my-fish/issues/191
[#217]: https://github.com/oh-my-fish/oh-my-fish/issues/217
[#235]: https://github.com/oh-my-fish/oh-my-fish/pull/235

@ -3,18 +3,17 @@
> The <a href="http://fishshell.com">Fishshell</a> Framework
[![MIT License](https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square)](/LICENSE) [![Fish Shell Version](https://img.shields.io/badge/fish-≥v2.2.0-007EC7.svg?style=flat-square)](http://fishshell.com) [![Build](https://github.com/oh-my-fish/oh-my-fish/workflows/Build/badge.svg)](https://github.com/oh-my-fish/oh-my-fish/actions?query=workflow%3ABuild)
[![MIT License](https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square)](/LICENSE) [![Fish Shell Version](https://img.shields.io/badge/fish-≥v2.2.0-007EC7.svg?style=flat-square)](http://fishshell.com) [![Travis Build Status](http://img.shields.io/travis/oh-my-fish/oh-my-fish.svg?style=flat-square)](https://travis-ci.org/oh-my-fish/oh-my-fish) [![Slack Status](https://oh-my-fish-slack.herokuapp.com/badge.svg)](https://oh-my-fish-slack.herokuapp.com)
Oh My Fish provides core infrastructure to allow you to install packages which extend or modify the look of your shell. It's fast, extensible and easy to use.
> Also in&nbsp;
> <a href="docs/es-ES/README.md">🇪🇸</a>
> <a href="docs/nl-NL/README.md">🇳🇱</a>
> <a href="docs/pt-BR/README.md">🇧🇷</a>
> <a href="docs/ru-RU/README.md">🇷🇺</a>
> <a href="docs/uk-UA/README.md">🇺🇦</a>
> <a href="docs/zh-CN/README.md">🇨🇳</a>
> <a href="docs/uk-UA/README.md">🇺🇦</a>
> <a href="docs/pt-BR/README.md">🇧🇷</a>
> <a href="docs/es-ES/README.md">🇪🇸</a>
<br>
@ -31,20 +30,20 @@ Oh My Fish provides core infrastructure to allow you to install packages which e
You can get started right away with the default setup by running this in your terminal:
```fish
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
curl -L https://get.oh-my.fish | fish
```
This will download the installer script and start the installation. Alternatively, you can download the installer and customize your install:
```fish
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install
curl -L https://get.oh-my.fish > install
fish install --path=~/.local/share/omf --config=~/.config/omf
```
You can verify the integrity of the downloaded installer by verifying the script against [this checksum](bin/install.sha256):
```
curl -sL https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install.sha256 | shasum -a 256 --check
bb1f4025934600ea6feef2ec11660e17e2b6449c5a23c033860aed712ad328c9 install
```
You can also install Oh My Fish with Git or with an offline source tarball downloaded from the [releases page][releases]:
@ -55,7 +54,7 @@ $ git clone https://github.com/oh-my-fish/oh-my-fish
$ cd oh-my-fish
$ bin/install --offline
# with a tarball
$ curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install
$ curl -L https://get.oh-my.fish > install
$ fish install --offline=omf.tar.gz
```
@ -86,12 +85,11 @@ Update Oh My Fish, all package repositories, and all installed packages.
- For selective package update, list only the names of packages you wish to
update. You may still include "omf" in the list to update the core as well.
#### `omf install` _`[<name>|<url>|<user/repo>]`_
#### `omf install` _`[<name>|<url>]`_
Install one _or more_ packages.
- You can install packages directly by URL via `omf install URL`
- You can install packages from a GitHub repository via `omf install user/repo`
- When called without arguments, install missing packages from [bundle](#dotfiles).
#### `omf repositories` _`[list|add|remove]`_
@ -108,7 +106,7 @@ Apply a theme. To list available themes, type `omf theme`. You can also [preview
#### `omf remove` _`<name>`_
Remove a theme or package. If a package was installed via `user/repo`, use `repo` for `name`.
Remove a theme or package.
> Packages can use uninstall hooks, so custom cleanup of resources can be done when uninstalling it. See [Uninstall](/docs/en-US/Packages.md#uninstall) for more information.

@ -1,23 +0,0 @@
# Security Policy
<!-- ## Supported Versions
Use this section to tell people about which versions of your project are
currently being supported with security updates.
| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: | -->
## Reporting a Vulnerability
To report a vulnerability, please contact the current maintainer:
https://github.com/scorphus (keybase: https://keybase.io/pablito)
<!-- Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc. -->

@ -54,13 +54,13 @@ Options:
set -g OMF_CHANNEL dev
case '--channel=*'
abort "Unknown release channel \""(echo "$argv[1]" | command cut -d= -f2-)"\"."
abort "Unknown release channel \""(echo "$argv[1]" | command cut -d= -f2)"\"."
case --check
set -g CHECK_ONLY
case '--config=*'
echo "$argv[1]" | command cut -d= -f2- | command sed -e "s#~#$HOME#" | read -g OMF_CONFIG
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OMF_CONFIG
case --noninteractive
set -g NONINTERACTIVE
@ -70,10 +70,10 @@ Options:
case '--offline=*'
set -g OFFLINE
echo "$argv[1]" | command cut -d= -f2- | command sed -e "s#~#$HOME#" | read -g OFFLINE_PATH
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OFFLINE_PATH
case '--path=*'
echo "$argv[1]" | command cut -d= -f2- | command sed -e "s#~#$HOME#" | read -g OMF_PATH
echo "$argv[1]" | command cut -d= -f2 | command sed -e "s#~#$HOME#" | read -g OMF_PATH
case --uninstall
set -g UNINSTALL
@ -225,9 +225,7 @@ function install_offline
if test -f "$OFFLINE_PATH"
say "Offline path is a file, assuming tar archive..."
mkdir -p "$OMF_PATH"
command tar -xf "$OFFLINE_PATH" -C "$OMF_PATH" --strip-components=1
command tar -xf "$OFFLINE_PATH" -C "$OMF_PATH"
or abort "Could not extract tar file $OFFLINE_PATH"
return

@ -1 +1 @@
429a76e5b5e692c921aa03456a41258b614374426f959535167222a28b676201 install
bb1f4025934600ea6feef2ec11660e17e2b6449c5a23c033860aed712ad328c9 install

File diff suppressed because it is too large Load Diff

@ -20,7 +20,7 @@ Provides options to list, download and remove packages, update the framework, cr
<<remove.adoc#,**r**emove>>:: Remove a package.
<<repositories.adoc#,**repo**sitories>>:: Manage package repositories.
<<search.adoc#,**s**earch>>:: Search for a package or theme.
<<theme.adoc#,**t**heme>>:: Activate and list available themes.
<<theme.adoc#,**t**heme>>:: Install and list themes.
<<update.adoc#,**u**pdate>>:: Update Oh My Fish.
<<version.adoc#,**version**>>:: Display version and exit.

@ -1,8 +1,8 @@
Activate and list available themes.
Install and list themes.
== USAGE
omf theme List available and installed themes
omf theme <name> Activate theme by name
omf theme List available themes to install
omf theme <name> Install theme by name
== EXAMPLES
omf theme

@ -4,13 +4,10 @@
# FAQ
> Oh My Fish Documentation&nbsp;&bull;&nbsp;Also in
> <a href="../es-ES/FAQ.md">🇪🇸</a>
> <a href="../nl-NL/FAQ.md">🇳🇱</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
> <a href="../ru-RU/FAQ.md">🇷🇺</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
<br>
Thanks for taking the time to read this FAQ. Feel free to create a new issue if your question is not answered here.

@ -4,13 +4,10 @@
# Packages
> Oh My Fish Documentation&nbsp;&bull;&nbsp;Also in
> <a href="../es-ES/Packages.md">🇪🇸</a>
> <a href="../nl-NL/Packages.md">🇳🇱</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
> <a href="../ru-RU/Packages.md">🇷🇺</a>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
> <a href="../zh-CN/Packages.md">🇨🇳</a>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
<br>
# Creating
@ -120,7 +117,6 @@ Inside this hook, you can access two package-related variables:
Packages can use this hook to clean up custom resources, etc.
> Note: for backwards-compatibility, uninstall hooks will also be run if they are located at `uninstall.fish` in the package root.
> Hooks may also be triggered by listening for the event `{$package}_uninstall` or `uninstall_$package`.
# Make it public

@ -5,12 +5,10 @@
> La documentación de Oh My Fish&nbsp;&bull;&nbsp;También disponible en
> <a href="../en-US/FAQ.md">🇺🇸</a>
> <a href="../nl-NL/FAQ.md">🇳🇱</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
> <a href="../ru-RU/FAQ.md">🇷🇺</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
<br>
Gracias por dedicar tiempo para leer este apartado de preguntas frecuentes (FAQ). Siéntete libre de crear un nuevo _issue_ si su pregunta no está respondida

@ -5,12 +5,10 @@
> La documentación de Oh My Fish&nbsp;&bull;&nbsp;También disponible en
> <a href="../en-US/Packages.md">🇺🇸</a>
> <a href="../nl-NL/Packages.md">🇳🇱</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
> <a href="../ru-RU/Packages.md">🇷🇺</a>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
> <a href="../zh-CN/Packages.md">🇨🇳</a>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
<br>
# Creando

@ -1,7 +1,7 @@
<img src="https://cdn.rawgit.com/oh-my-fish/oh-my-fish/e4f1c2e0219a17e2c748b824004c8d0b38055c16/docs/logo.svg" align="left" width="192px" height="192px"/>
<img align="left" width="0" height="192px" hspace="10"/>
> El _framework_ de <a href="http://fishshell.com">Fishshell</a>
> El _framework_ de <a href="http://fishshell.com">Fishshell</a>
[![MIT License](https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square)](/LICENSE) [![Fish Shell Version](https://img.shields.io/badge/fish-≥v2.2.0-007EC7.svg?style=flat-square)](http://fishshell.com) [![Travis Build Status](http://img.shields.io/travis/oh-my-fish/oh-my-fish.svg?style=flat-square)](https://travis-ci.org/oh-my-fish/oh-my-fish) [![Slack Status](https://oh-my-fish-slack.herokuapp.com/badge.svg)](https://oh-my-fish-slack.herokuapp.com)
@ -10,12 +10,11 @@ Oh My Fish ofrece la infraestructura básica para permitirle instalar paquetes q
sencillo de utilizar.
> También disponible en&nbsp;
> <a href="../../README.md">🇺🇸</a>
> <a href="../nl-NL/README.md">🇳🇱</a>
> <a href="../pt-BR/README.md">🇧🇷</a>
> <a href="../ru-RU/README.md">🇷🇺</a>
> <a href="../uk-UA/README.md">🇺🇦</a>
> <a href="../zh-CN/README.md">🇨🇳</a>
> <a href="../en-US/FAQ.md">🇺🇸</a>
> <a href="docs/ru-RU/README.md">🇷🇺</a>
> <a href="docs/zh-CN/README.md">🇨🇳</a>
> <a href="docs/uk-UA/README.md">🇺🇦</a>
> <a href="docs/pt-BR/README.md">🇧🇷</a>
<br>
@ -24,10 +23,10 @@ sencillo de utilizar.
* [Comenzando (descripciones de los comandos)](#comenzando)
* [Avanzado](#avanzado)
* [Inicio](#inicio)
* [Archivos de configuración (Dotfiles)](#archivos-de-configuraci%C3%B3n-dotfiles)
* [Archivos de configuración (Dotfiles)](#dotfiles)
* [Creando paquetes](#creando-paquetes)
## Instalación
## Instalación
Puede comenzar de inmediato con la configuración predeterminada ejecutando lo siguiente en su terminal:
@ -42,13 +41,13 @@ curl -L https://get.oh-my.fish > install
fish install --path=~/.local/share/omf --config=~/.config/omf
```
Puede verificar la integridad del instalador descargado comprobando el script con esta [suma de verificación](/bin/install.sha256):
Puede verificar la integridad del instalador descargado comprobando el script con esta [suma de verificación](bin/install.sha256):
```
bb1f4025934600ea6feef2ec11660e17e2b6449c5a23c033860aed712ad328c9 install
434264c56e3a7bb74733d9b293d72403c404e0a0bded3e632433d391d302504e install
```
También puede insatalar Oh My Fish mediante Git o con un archivo tarball descargado desde la [página de publicaciones][/releases]:
También puede insatalar Oh My Fish mediante Git o con un archivo tarball descargado desde la [página de publicaciones][releases]:
```fish
# with git
@ -65,7 +64,7 @@ Ejecute `install --help` para obtener una lista completa de opciones de instalac
#### Requisitos
- **fish** shell, versión 2.2 o posterior
- **git**, versión 1.9.5 o posterior
- **git**, versión 1.9.5 o posterior
#### Problemas conocidos
@ -74,7 +73,7 @@ Ejecute `install --help` para obtener una lista completa de opciones de instalac
(ver [#541](https://github.com/oh-my-fish/oh-my-fish/issues/541))
## Comenzando
## Comenzando
Oh My Fish incluye una pequeña utilidad `omf` para extraer e instalar nuevos paquetes y temas.
@ -92,7 +91,7 @@ Actualiza Oh My Fish, todos los paquetes de los repositorios y todos los paquete
Instala uno _o más_ paquetes.
- Puede instalar paquetes directamente con la URL mediante `omf install URL`
- Cuando es ejecutado sin argumentos, instala paquetes faltantes desde [bundle](#archivos-de-configuraci%C3%B3n-dotfiles).
- Cuando es ejecutado sin argumentos, instala paquetes faltantes desde [bundle](#dotfiles).
#### `omf repositories` _`[list|add|remove]`_
@ -149,7 +148,7 @@ Utilizar para diagnosticar un error antes de [abrir un _issue_][omf-issues-new].
Desinstala Oh My Fish.
## Avanzado
## Avanzado
El instalador de Oh My Fish añade un fragmento a los archivos de configuración de fish del usuario (`~/.config/fish/conf.d/`) que llama al código de
arranque de OMF.
@ -163,10 +162,10 @@ Así que si `a_script.fish` depende de complementos gestionados por OMF, conside
De manera similar, para asegurarse que un script se ejecuta antes de `omf.fish`, debería añadirle el prefijo `00_`.
De manera alternativa también se puede utilizar `~/.config/omf/before.init.fish`.
### Inicio
### Inicio
Cada vez que abre una nueva shell, el código de inicio inicializa la ruta de instalación y la ruta de configuración de Oh My Fish (`~/.config/omf` de manera
predeterminada), ejecutando el script [`init.fish`](/init.fish) posteriormente, que carga de manera automática los paquetes, temas y sus ficheros
predeterminada), ejecutando el script [`init.fish`](init.fish) posteriormente, que carga de manera automática los paquetes, temas y sus ficheros
personalizados de inicio.
Para más información puede consultar la sección de preguntas frecuentes [FAQ](FAQ.md#qué-hace-oh-my-fish-exactamente).
@ -195,14 +194,14 @@ sesión de la shell. Para conseguir esto, es necesario definirlas de manera glob
# Los desarrolladore de Golang quizás necesitan esto
set -xg GOPATH $HOME/gocode
# En cambio los desarrolladores de Python
# En cambio los desarrolladores de Python
set -xg PYTHONDONTWRITEBYTECODE 1
```
#### Acerca de bundle
Cada vez que un paquete/tema es instalado o eliminado, el archivo `bundle` es actualizado. También puedes editarlo manualmente y después ejecutar `omf
install` para tomar en cuenta los cambios realizados. Por favor tenga en cuenta que mientras que los paquetes/temas añadidos a _bundle_ son
install` para tomar en cuenta los cambios realizados. Por favor tenga en cuenta que mientras que los paquetes/temas añadidos a _bundle_ son
instalados automáticamente, un paquete/tema eliminado de _bundle_ no es eliminado de la instalación del usuario.
#### Versiones antiguas de fish

@ -1,92 +0,0 @@
<img src="https://cdn.rawgit.com/oh-my-fish/oh-my-fish/e4f1c2e0219a17e2c748b824004c8d0b38055c16/docs/logo.svg" align="left" width="128px" height="128px"/>
<img align="left" width="0" height="128px"/>
# Veelgestelde vragen
> Oh My Fish-documentatie&nbsp;&bull;&nbsp;Ook beschikbaar in het
> <a href="../en-US/FAQ.md">🇺🇸</a>
> <a href="../es-ES/FAQ.md">🇪🇸</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
> <a href="../ru-RU/FAQ.md">🇷🇺</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
<br>
Fijn dat u even de tijd neemt om de veelgestelde vragen door te nemen. Als uw vraag hierna nog niet beantwoord is, open dan een 'issue'.
## Wat is Oh My Fish en waarom zou ik het willen gebruiken?
Oh My Fish (OMF) is een _framework_ voor de [Fish-shell](http://fishshell.com/). OMF helpt u de configuratie te beheren en thema's en pakketten te installeren.
## Wat moet ik kennen om Oh My Fish te kunnen gebruiken?
_Niks_. Installeer Oh My Fish en gebruik Fish zoals gebruikelijk. Typ `omf help` als u iets nieuws wilt leren.
## Wat zijn Oh My Fish-pakketten?
Oh My Fish-pakketten zijn thema's of plug-ins, geschreven in fish, die de kernfunctionaliteit uitbreiden, code uitvoeren tijdens het opstarten, automatische aanvullingen van veelgebruikte programma's toevoegen, etc.
## Wat voor Oh My Fish-pakketten zijn er zoal beschikbaar?
Er zijn 3 soorten pakketgroepen:
1. Configuratiehulpmiddelen. Een voorbeeld hiervan is [`pkg-pyenv`](https://github.com/oh-my-fish/pkg-pyenv), dat controleert of `pyenv` aanwezig is op uw systeem en `(pyenv init - | psub)` uitvoert tijdens het opstarten.
2. Thema's. Bekijk de [themagalerij](https://github.com/oh-my-fish).
3. Traditionele shell-hulpmiddelen. Een voorbeeld hiervan is [`pkg-copy`](https://github.com/oh-my-fish/pkg-copy), een klembordbeheerder die op zowel Linux als macOS werkt.
## Wat doet Oh My Fish precies?
+ Voert `$OMF_CONFIG/before.init.fish` uit (indien beschikbaar).
+ Laadt automatisch pakketten en thema's uit `$OMF_PATH/`.
+ Laadt automatisch uw configuratiepad. Standaard is dit `~/.config/omf`, maar dit is instelbaar middels `$OMF_CONFIG`.
+ Laadt automatisch de `functions`-map uit `$OMF_PATH` en `$OMF_CONFIG`
+ Voert `$OMF_CONFIG/init.fish` uit (indien beschikbaar).
## Hoe kan ik een reeds aanwezige Oh My Fish-installatie bijwerken?
> :warning: Maak een back-up van uw verborgen bestanden en andere belangrijke gegevens.
```
curl -L github.com/oh-my-fish/oh-my-fish/raw/master/bin/install | sh
```
U kunt `$fish_path` nu veilig verwijderen.
```fish
rm -rf "$fish_path"
```
## Hoe stel ik Fish in als mijn standaardshell?
Voeg Fish toe aan `/etc/shells`:
```sh
echo "/usr/local/bin/fish" | sudo tee -a /etc/shells
```
en schakel over:
```sh
chsh -s /usr/local/bin/fish
```
Indien gewenst kunt u altijd terug naar de vorige standaardshell:
> Vervang, indien nodig, `/bin/bash` door `/bin/tcsh` of `/bin/zsh`.
```sh
chsh -s /bin/bash
```

@ -1,130 +0,0 @@
<img src="https://cdn.rawgit.com/oh-my-fish/oh-my-fish/e4f1c2e0219a17e2c748b824004c8d0b38055c16/docs/logo.svg" align="left" width="128px" height="128px"/>
<img align="left" width="0" height="128px"/>
# Pakketten
> Oh My Fish-documentatie&nbsp;&bull;&nbsp;Ook beschikbaar in het
> <a href="../en-US/Packages.md">🇺🇸</a>
> <a href="../es-ES/Packages.md">🇪🇸</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
> <a href="../ru-RU/Packages.md">🇷🇺</a>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
> <a href="../zh-CN/Packages.md">🇨🇳</a>
<br>
# Maken
Om pakketten te leren maken, gaat u een nieuw pakket volgens een sjabloon maken. Dit pakket bevat een `hello_world`-opdracht voor uw shell. Pakketnamen mogen alleen kleine letters en streepjes bevatten.
Oh My Fish kan een pakketstructuur voor u samenstellen. Gebruik hiervoor `omf new`:
```fish
$ omf new plugin hello_world
```
> Voer `omf new theme my_theme_name` uit om thema's te maken.
Er wordt overgeschakeld van de huidige map naar die van het pakket:
```
$ ls -l
README.md
init.fish
functions/hello_world.fish
completions/hello_world.fish
```
>Omschrijf altijd in `README.md` hoe uw pakket werkt.
>Lees meer over [automatisch aanvullen](http://fishshell.com/docs/current/commands.html#complete) en gebruik het zorgvuldig.
`functions/hello_world.fish` omvat een enkele functie:
```fish
function hello_world -d "Toont hallo wereld"
echo "Hallo wereld!"
end
```
Elke functie in uw pakket dient te worden verklaard in een bestand in elke `functions`-map. Fish vereist dit voor het automatisch laden, welke functies op afroep laadt, zodat ongebruikte functies niet worden geladen.
Let op: Fish bevat geen private scope, dus als u uw pakket moet splitsen in functies, voorkom dan dubbele namen door een aanduiding te gebruiken, zoals uw pakketnaam (bijv. `hello_world_print_help`). Om de opdrachtnamespace niet te bezaaien met onnodige functies, kunt u privéfuncties aanduiden met twee onderliggende streepjes (bijv. `__function_name_print_help`).
# Hooks
Oh My Fish bevat een 'hooks'-systeem waarmee u scripts kunt maken voor uw pakket die worden uitgevoerd als andere gebeurtenissen plaatsvinden. Pakketten kunnen deze hooks gebruiken om geavanceerde installatie te bieden, aangepaste bronnen, etc. Hooks zijn eigenlijk Fish-scripts die genoemd zijn naar de gebeurtenis die ze aanroepen. De meeste hooks staan in een `hooks`-map in de projectmap van het pakket.
>Hooks die worden aangeroepen tijdens het opstarten (`init.fish` en `key_bindings.fish`) kunnen het starten van de shell vertragen. Voorkom dus langzame code tijdens het starten! Als uw pakket geen hook nodig heeft, verwijder dan het bestand.
De werkmap in een hook is altijd ingesteld op de hoofdmap van het pakket. De momenteel door Oh My Fish ondersteunde hooks staan hieronder:
## `init`
De `init`-hook wordt uitgevoerd tijdens het starten van de shell. Scripts die deze hook aanroepen dienen te worden geplaatst in `init.fish` in de hoofdmap van het pakket.
Binnen deze hook heeft u toegang tot drie gerelateerde variabelen:
* `$package`: pakketnaam
* `$path`: pakketinstallatiepad
* `$dependencies`: pakketafhankelijkheden
Voorbeeld: met een `init.fish`-script die de code
```fish
echo "hello_world initialized"
```
bevat, ziet u de regel `hello_world is geïnitialiseerd` bovenaan het terminalvenster als de shell net is gestart.
Gebruik deze hook om de omgeving aan te passen, bronnen te laden, functies automatisch te laden, etc. Als uw pakket geen functie aanroept, kunt u hiermee functionaliteit toevoegen aan uw pakket of dynamische functies samenstellen.
## `key_bindings`
Als uw pakket of thema sneltoetsen gebruikt, stel deze dan in in de `key_bindings`-hook. Sneltoetsscripts dienen geplaatst te worden in `key_bindings.fish` in de hoofdmap van het pakket. Binnen deze hook kunt u de [`bind`][fish-bind]-opdracht vrij gebruiken om aangepaste sneltoetsen in te stellen.
>Thema's kunnen ook sneltoetsen bevatten! Oh My Fish herlaadt de sneltoetsen als u overschakelt naar een ander thema.
## `install`
De `install`-hook wordt aangeroepen als een pakket voor het eerst wordt geïnstalleerd. Scripts die deze hook gebruiken dienen te worden geplaatst in `hooks/install.fish`.
Binnen deze hook heeft u toegang tot twee gerelateerde variabelen:
* `$package`: pakketnaam
* `$path`: pakketinstallatiepad
Deze hook is handig voor het downloaden van aanvullende bronnen, instellen van Git-submodules of het installeren van externe afhankelijkheden, zoals Bash-scripts.
## `update`
Zoals de naam doet vermoeden wordt de `update`-hook aangeroepen nadat een pakket is bijgewerkt. Scripts die deze hook gebruiken dienen te worden geplaatst in `hooks/update.fish`.
Binnen deze hook heeft u toegang tot twee gerelateerde variabelen:
* `$package`: pakketnaam
* `$path`: pakketinstallatiepad
Deze hook is handig voor het bijwerken van Git-submodules of controleren op nieuwe versies van externe afhankelijkheden.
## `uninstall`
De `uninstall`-hook wordt aangeroepen vlak voordat een pakket wordt verwijderd middels `omf remove <pkg>`. Scripts die deze hook gebruiken dienen te worden geplaatst in `hooks/uninstall.fish`.
Binnen deze hook heeft u toegang tot twee gerelateerde variabelen:
* `$package`: pakketnaam
* `$path`: pakketinstallatiepad
Pakketten kunnen deze hook gebruiken om aangepaste bronnen te wissen of anderzijds op te schonen.
> Let op: omwille van achterwaartse compatibiliteit worden uninstall-hooks ook aangeroepen door `uninstall.fish` in de hoofdmap van het pakket.
# Delen
Het officiële register met openbare pakketten wordt beheerd in de [oh-my-fish/packages-main](https://github.com/oh-my-fish/packages-main)-pakketbron. Neem de README van die pakketbron door om te zien hoe u uw pakket kunt toevoegen.
[fish-bind]: http://fishshell.com/docs/current/commands.html#bind
[omf-pulls-link]: https://github.com/oh-my-fish/oh-my-fish/pulls

@ -1,210 +0,0 @@
<img src="https://cdn.rawgit.com/oh-my-fish/oh-my-fish/e4f1c2e0219a17e2c748b824004c8d0b38055c16/docs/logo.svg" align="left" width="192px" height="192px"/>
<img align="left" width="0" height="192px" hspace="10"/>
> Het <a href="http://fishshell.com">Fish-shell</a> framework
[![MIT License](https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square)](/LICENSE) [![Fish Shell Version](https://img.shields.io/badge/fish-≥v2.2.0-007EC7.svg?style=flat-square)](http://fishshell.com) [![Travis Build Status](http://img.shields.io/travis/oh-my-fish/oh-my-fish.svg?style=flat-square)](https://travis-ci.org/oh-my-fish/oh-my-fish) [![Slack Status](https://oh-my-fish-slack.herokuapp.com/badge.svg)](https://oh-my-fish-slack.herokuapp.com)
Oh My Fish biedt kerninfrastructuur zodat u pakketten kunt installeren om uw shell uit te breiden of aan te passen. Het is snel, uitbreidbaar en eenvoudig te gebruiken.
> Ook beschikbaar in het&nbsp;
> <a href="../../README.md">🇺🇸</a>
> <a href="../es-ES/README.md">🇪🇸</a>
> <a href="../pt-BR/README.md">🇧🇷</a>
> <a href="../ru-RU/README.md">🇷🇺</a>
> <a href="../uk-UA/README.md">🇺🇦</a>
> <a href="../zh-CN/README.md">🇨🇳</a>
<br>
## Inhoudsopgave
* [Installatie](#installatie)
* [Aan de slag (uitleg omtrent opdrachten)](#aan-de-slag)
* [Geavanceerd](#geavanceerd)
* [Opstarten](#opstarten)
* [Puntbestanden](#puntbestanden)
* [Pakketten maken](#pakketten-maken)
## Installatie
U kunt direct aan de slag door deze opdracht uit te voeren in een terminalvenster:
```fish
curl -L https://get.oh-my.fish | fish
```
Hiermee downloadt u het installatiescript en voert u de standaardinstallatie uit. Indien gewenst kunt u het installatiescript downloaden en aanvullende opties opgeven:
```fish
curl -L https://get.oh-my.fish > install
fish install --path=~/.local/share/omf --config=~/.config/omf
```
U kunt de integriteit van het installatiescript verifiëren met [deze controlesom](/bin/install.sha256):
```
bb1f4025934600ea6feef2ec11660e17e2b6449c5a23c033860aed712ad328c9 install
```
Ook kunt u Oh My Fish installeren middels Git of een offline-brontarball van de [uitgavenpagina][releases]:
```fish
# middels git
$ git clone https://github.com/oh-my-fish/oh-my-fish
$ cd oh-my-fish
$ bin/install --offline
# middels een tarball
$ curl -L https://get.oh-my.fish > install
$ fish install --offline=omf.tar.gz
```
Voer `install --help` uit om een volledige lijst met installatieopties te bekijken.
#### Vereisten
- **fish**-shell, versie 2.2 of hoger
- **git**, versie 1.9.5 of hoger
#### Gemelde problemen
- Door een bug in Fish 2.6 in sommige terminalemulators zijn opdrachtregels aan de rechterkant momenteel onbruikbaar.
OMF's `standaard`thema maakt hier gebruik van, dus raden wij aan een alternatief thema te gebruiken tot het probleem is opgelost.
(zie [#541](https://github.com/oh-my-fish/oh-my-fish/issues/541))
## Aan de slag
Oh My Fish bevat het hulpprogramma `omf` om pakketten en thema's op te halen en te installeren.
#### `omf update` _`[omf]`_ _`[<package>...]`_
Werk Oh My Fish, alle pakketbronnen en geïnstalleerde pakketten bij.
- Zonder opdrachtregelopties worden de kern en alle geïnstalleerde pakketten bijgewerkt.
- Voer `omf update omf` uit om alleen de kern bij te werken.
- Geef pakketnamen op om alleen specifieke pakketten bij te werken. U kunt hieraan desgewenst "omf" toevoegen om ook de kern bij te werken.
#### `omf install` _`[<name>|<url>]`_
Installeer één _of meerdere_ pakketten.
- U kunt pakketten installeren door een url op te geven met `omf install url`
- Zonder opdrachtregelopties worden alleen ontbrekende pakketten geïnstalleerd uit de [bundel](#puntbestanden).
#### `omf repositories` _`[list|add|remove]`_
Beheer eigen toegevoegde pakketbronnen. Pakketbronnen bevatten de pakketten die kunnen worden geïnstalleerd met `omf install`. Standaard is alleen de [officiële pakketbron](https://github.com/oh-my-fish/packages-main) beschikbaar.
#### `omf list`
Toon alle geïnstalleerde pakketten.
#### `omf theme` _`<theme>`_
Pas een thema toe. Bekijk alle beschikbare thema's met `omf theme`. U kunt ze ook [voorvertonen](/docs/Themes.md).
#### `omf remove` _`<name>`_
Verwijder een thema of pakket.
> Pakketten kunnen deïnstallatieopties bevatten zodat er aangepaste opschoning kan plaatsvinden. Lees voor meer informatie [Deïnstalleren](/docs/nl-NL/Packages.md#uninstall).
#### `omf reload`
Herlaad Oh My Fish en alle plug-ins door `exec` uit te voeren om alle huidige shellprocessen te vervangen door een nieuw proces.
> Deze opdracht probeert zo veilig mogelijk te werk te gaan en bijwerkingen van `exec` te voorkomen.
#### `omf new plugin | theme` _`<name>`_
Maak een nieuwe plug-in of nieuw thema.
> Hiermee maakt u een nieuwe map `$OMF_CONFIG/{pkg | themes}/` aan met een sjabloon.
#### `omf search` _`-t|--theme / -p|--package`_ _`<name>`_
Zoek een specifiek pakket, thema of beide in Oh My Fish's databank. Als u de naam niet kent, is eenvoudig zoeken mogelijk met `omf search simple`.
#### `omf channel`
Toon of wijzig het updatekanaal.
Standaard zijn er twee kanalen beschikbaar: `stable`, welke stabiele updates aanbiedt op basis van de nieuwste tag en `dev`, welke updates aanbiedt met de allernieuwste code die vaak nog in ontwikkeling is. Het ingestelde updatekanaal bepaalt welke versie `omf update` installeert.
#### `omf doctor`
Voer dit uit om foutopsporingsinformatie vast te leggen voor [een 'issue'][omf-issues-new].
#### `omf destroy`
Deïnstalleer Oh My Fish.
## Geavanceerd
Het Oh My Fish-installatiescript voegt een knipsel toe aan de Fish-configuratiebestanden (`~/.config/fish/conf.d/`) dat OMF's opstartcode aanroept.
Let op: de scripts in bovenstaande map worden uitgevoerd op basis van de volgorde die het bestandssysteem aanhoudt,
dus kan het nuttig zijn scriptbestanden aan te duiden met een getal.
Voorbeeld: `a_script.fish` geniet de voorkeur boven het `omf.fish`-knipsel.
Dus als `a_script.fish` afhankelijk is van door OMF beheerde plug-ins, is het raadzaam om de naam van het scriptbestand te wijzigen in `xx_a_script.fish`.
Als een script moet worden uitgevoerd voordat `omf.fish` wordt aangeroepen, kunt u het aanduiden met `00_`.
Ook kunt u `~/.config/omf/before.init.fish` hiervoor gebruiken.
### Opstarten
Telkens als u een nieuwe shell opent, initialiseert de opstartcode het Oh My Fish-installatie- en _config_-pad (standaard: `~/.config/omf`),
waardoor het [`init.fish`](/init.fish)-script naderhand wordt aangeroepen. Dit script bevat een lijst met geïnstalleerde pakketten, thema's en aangepaste init-bestanden.
Lees voor meer informatie de [veelgestelde vragen](./FAQ.md#wat-doet-oh-my-fish-precies).
### Puntbestanden
De `$OMF_CONFIG`-map duidt de gebruikersstatus van Oh My Fish aan. Dit is dé perfecte map om toe te voegen aan uw puntbestanden en/of versiebeheersysteem. De map bevat drie belangrijke bestanden:
- __`theme`__ - het huidige thema
- __`bundle`__ - de lijst met geïnstalleerde pakketten en thema's
- __`channel`__ - het OMF-updatekanaal (stable of dev)
Verder kunt u deze speciale bestanden aanmaken of aanpassen:
- __`init.fish`__ - aangepast script dat wordt uitgevoerd na het starten van de shell
- __`before.init.fish`__ - aangepast script dat wordt uitgevoerd vóór het starten van de shell
- __`key_bindings.fish`__ - aangepaste sneltoetsen die kunnen worden toegewezen met de opdracht `bind`
#### Variabelen instellen in `init.fish`
Eén van de meestgebruikte opstartopdrachten in `init.fish` is de variabelendefinitie. Zulke variabelen dienen beschikbaar te zijn in elke shellsessie. Dit kan bijvoorbeeld middels het volgende:
```fish
# Voor Golang-ontwikkelaars
set -xg GOPATH $HOME/gocode
# Voor Python-ontwikkelaars
set -xg PYTHONDONTWRITEBYTECODE 1
```
#### Over de bundel
Telkens als een pakket of thema geïnstalleerd of verwijderd wordt, wordt het `bundle`-bestand bijgewerkt. U kunt dit bestand tevens handmatig aanpassen en nadien `omf install` uitvoeren om de wijzigingen toe te passen. Let op: als pakketten of thema's automatisch geïnstalleerd zijn, leidt verwijderen uit de bundel niet tot deïnstallatie.
#### Oudere Fish-versies
Fish 2.2 bevat geen `conf.d`-map, dus dient de opstartcode toegevoegd te worden aan het Fish-configuratiebestand (`~/.config/fish/config.fish`).
Het is raadzaam om uw aangepaste opstartopdracht toe te voegen aan `init.fish` in plaats van `~/.config/fish/config.fish`, zodat de gehele `$OMF_CONFIG`-map beschikbaar blijft voor versiebeheer.
Als opstartopdrachten uitgevoerd dienen te worden *vóór* Oh My Fish start, voeg ze dan toe aan `before.init.fish`. Voeg bij twijfel alles toe aan `init.fish`.
## Pakketten maken
Oh My Fish gebruikt een geavanceerde, goedgedocumenteerde plug-inarchitectuur om het maken van plug-ins te vereenvoudigen, inclusief init- en uninstall-opties, functies en automatische aanvulling. Lees voor meer informatie [de pakketdocumentatie](Packages.md).
[fishshell]: http://fishshell.com
[contributors]: https://github.com/oh-my-fish/oh-my-fish/graphs/contributors
[omf-pulls-link]: https://github.com/oh-my-fish/oh-my-fish/pulls
[omf-issues-new]: https://github.com/oh-my-fish/oh-my-fish/issues/new
[releases]: https://github.com/oh-my-fish/oh-my-fish/releases

@ -5,11 +5,9 @@
> Documentação do Oh My Fish &nbsp;&bull;&nbsp;Also in
> <a href="../en-US/FAQ.md">🇺🇸</a>
> <a href="../es-ES/FAQ.md">🇪🇸</a>
> <a href="../nl-NL/FAQ.md">🇳🇱</a>
> <a href="../ru-RU/FAQ.md">🇷🇺</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
<br>

@ -5,11 +5,9 @@
> Documentação do Oh My Fish &nbsp;&bull;&nbsp;Also in
> <a href="../en-US/Packages.md">🇺🇸</a>
> <a href="../es-ES/Packages.md">🇪🇸</a>
> <a href="../nl-NL/Packages.md">🇳🇱</a>
> <a href="../ru-RU/Packages.md">🇷🇺</a>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
> <a href="../zh-CN/Packages.md">🇨🇳</a>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
<br>

@ -11,11 +11,10 @@ O Oh My Fish fornece infra-estrutura básica para permitir que você instale pac
> Also in&nbsp;
> <a href="../../README.md">🇺🇸</a>
> <a href="../es-ES/README.md">🇪🇸</a>
> <a href="../nl-NL/README.md">🇳🇱</a>
> <a href="../ru-RU/README.md">🇷🇺</a>
> <a href="../uk-UA/README.md">🇺🇦</a>
> <a href="../zh-CN/README.md">🇨🇳</a>
> <a href="../uk-UA/README.md">🇺🇦</a>
> <a href="../es-ES/README.md">🇪🇸</a>
<br>
@ -62,7 +61,7 @@ Lista dos pacotes instalados.
#### `omf theme` _`<theme>`_
Aplica um tema. Para lista os temas disponíveis, digite `omf theme`. Você pode também [visualizar os temas disponíveis](/docs/Themes.md) antes da instalação.
Aplica um tema. Para lista os temas disponíveis, digite `omf theme`. Você pode também [visualizar os temas disponíveis](./docs/Themes.md) antes da instalação.
#### `omf remove` _`<name>`_

@ -5,11 +5,9 @@
> Oh My Fish Documentation&nbsp;&bull;&nbsp;Also in
> <a href="../en-US/FAQ.md">🇺🇸</a>
> <a href="../es-ES/FAQ.md">🇪🇸</a>
> <a href="../nl-NL/FAQ.md">🇳🇱</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
<br>

@ -5,13 +5,9 @@
> Oh My Fish Documentation&nbsp;&bull;&nbsp;Also in
> <a href="../en-US/Packages.md">🇺🇸</a>
> <a href="../es-ES/Packages.md">🇪🇸</a>
> <a href="../nl-NL/Packages.md">🇳🇱</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
> <a href="../zh-CN/Packages.md">🇨🇳</a>
<br>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
# Создание

@ -9,11 +9,10 @@ Oh My Fish обеспечивает базовую инфраструктуру,
> Also in&nbsp;
> <a href="../../README.md">🇺🇸</a>
> <a href="../es-ES/README.md">🇪🇸</a>
> <a href="../nl-NL/README.md">🇳🇱</a>
> <a href="../pt-BR/README.md">🇧🇷</a>
> <a href="../uk-UA/README.md">🇺🇦</a>
> <a href="../zh-CN/README.md">🇨🇳</a>
> <a href="../uk-UA/README.md">🇺🇦</a>
> <a href="../pt-BR/README.md">🇧🇷</a>
> <a href="../es-ES/README.md">🇪🇸</a>
<br>

@ -5,11 +5,9 @@
> Oh My Fish Documentation&nbsp;&bull;&nbsp;Also in
> <a href="../en-US/FAQ.md">🇺🇸</a>
> <a href="../es-ES/FAQ.md">🇪🇸</a>
> <a href="../nl-NL/FAQ.md">🇳🇱</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
> <a href="../ru-RU/FAQ.md">🇷🇺</a>
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
<br>

@ -5,13 +5,9 @@
> Oh My Fish Documentation&nbsp;&bull;&nbsp;Also in
> <a href="../en-US/Packages.md">🇺🇸</a>
> <a href="../es-ES/Packages.md">🇪🇸</a>
> <a href="../nl-NL/Packages.md">🇳🇱</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
> <a href="../ru-RU/Packages.md">🇷🇺</a>
> <a href="../zh-CN/Packages.md">🇨🇳</a>
<br>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
# Створення

@ -9,11 +9,10 @@ Oh My Fish надає базову інфраструктуру, щоб забе
> Also in&nbsp;
> <a href="../../README.md">🇺🇸</a>
> <a href="../es-ES/README.md">🇪🇸</a>
> <a href="../nl-NL/README.md">🇳🇱</a>
> <a href="../pt-BR/README.md">🇧🇷</a>
> <a href="../ru-RU/README.md">🇷🇺</a>
> <a href="../zh-CN/README.md">🇨🇳</a>
> <a href="../ru-RU/README.md">🇷🇺</a>
> <a href="../pt-BR/README.md">🇧🇷</a>
> <a href="../es-ES/README.md">🇪🇸</a>
<br>
@ -44,7 +43,7 @@ Oh My Fish містить невелику утиліту `omf` для зава
Встановлює один _або більше_ пакетів.
- Ви можете встановити пакети по URL за допомогою команди `omf install URL`
- Коли викликається без аргументів, встановлює відсутні пакети із [bundle](#Файли-конфігурації).
- Коли викликається без аргументів, встановлює відсутні пакети із [bundle](#Файли-конфигурації).
#### `omf list`

@ -5,12 +5,9 @@
> Oh My Fish Documentation&nbsp;&bull;&nbsp;Also in
> <a href="../en-US/FAQ.md">🇺🇸</a>
> <a href="../es-ES/FAQ.md">🇪🇸</a>
> <a href="../nl-NL/FAQ.md">🇳🇱</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
> <a href="../ru-RU/FAQ.md">🇷🇺</a>
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
<br>
感谢您花一些时间来阅读 FAQ。如果没有从下面找到你想问的问题欢迎给我们提交新的问题(Issue)。

@ -5,12 +5,9 @@
> Oh My Fish Documentation&nbsp;&bull;&nbsp;Also in
> <a href="../en-US/Packages.md">🇺🇸</a>
> <a href="../es-ES/Packages.md">🇪🇸</a>
> <a href="../nl-NL/Packages.md">🇳🇱</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
> <a href="../ru-RU/Packages.md">🇷🇺</a>
> <a href="../uk-UA/Packages.md">🇺🇦</a>
> <a href="../pt-BR/Packages.md">🇧🇷</a>
<br>
# 创建插件或主题

@ -9,11 +9,10 @@ Oh My Fish 提供核心基础设施的配置,允许每个人可以轻松安装
> Also in&nbsp;
> <a href="../../README.md">🇺🇸</a>
> <a href="../es-ES/README.md">🇪🇸</a>
> <a href="../nl-NL/README.md">🇳🇱</a>
> <a href="../pt-BR/README.md">🇧🇷</a>
> <a href="../ru-RU/README.md">🇷🇺</a>
> <a href="../uk-UA/README.md">🇺🇦</a>
> <a href="../pt-BR/README.md">🇧🇷</a>
> <a href="../es-ES/README.md">🇪🇸</a>
<br>
@ -43,8 +42,8 @@ Oh My Fish 自带的辅助命令工具 `omf` 可以帮助你快速获取安装
安装 _一个或多个_ 插件。
- 你可以通过输入指定的 URL 直接从`URL`安装插件。例子:`omf install url`
- 执行没有传入任何参数Oh My Fish将会从 [bundle](#dotfiles) 文件检索并安装本地尚未安装的插件和主题。
- 你可以通过输入指定的 URL 直接安装插件 `omf install URL`
- 当没有执行没有传入任何参数,将会从 [bundle](#dotfiles) 文件检索并安装本地尚未安装的插件和主题。
#### `omf list`
@ -58,13 +57,13 @@ Oh My Fish 自带的辅助命令工具 `omf` 可以帮助你快速获取安装
移除主题或插件。
> 包可以使用卸载钩子,所以资源的自定义清理可以在卸载时进行。有关更多信息,请参见 [卸载](Packages.md#卸载) 。
> 包可以使用卸载挂钩,所以资源的自定义清理可以做到卸载时。有关更多信息,请参见 [卸载](Packages.md#uninstall) 。
#### `omf new pkg | theme` _`<name>`_
创建新插件和主题的生成工具。
> 从模板创建新的插件/主题并保存于 `$OMF_CONFIG/{pkg | themes}/` 文件夹下面。
> 创建的模板会新创建并保存于 `$OMF_CONFIG/{pkg | themes}/` 文件夹下面。
#### `omf submit` _`pkg/<name>`_ _`[<url>]`_
@ -75,7 +74,7 @@ Oh My Fish 自带的辅助命令工具 `omf` 可以帮助你快速获取安装
#### `omf doctor`
使用前[打开一个新的issue][omf-issues-new]
使用前[开馆问题][omf-issues-new] 解决
#### `omf destroy`
@ -92,7 +91,7 @@ Oh My Fish 安装脚本会把自身启动代码加载到 fish 的配置文件 (`
## Dotfiles
`$OMF_CONFIG` 目录存储用户使用 Oh My Fish 的重要配置参数,这是把该目录的所有文件加入你的 dotfiles 或加入到版本控制的最完美的方式
`$OMF_CONFIG` 目录存储用户使用 Oh My Fish 的重要配置参数,这是最完美的方式把该目录的所有文件加入你的 dotfiles 或加入到版本控制。
有四个重要文件:
- __`theme`__ - 当前主题
@ -100,9 +99,9 @@ Oh My Fish 安装脚本会把自身启动代码加载到 fish 的配置文件 (`
- __`init.fish`__ - 壳开始后执行的自定义脚本
- __`before.init.fish`__ - 壳开始前执行的自定义脚本
它强烈建议您自定义的启动命令写入`init.fish` 文件而不是 `~/.config/omf/config.fish`,因为这可以让你保持在版本控制整个 `$OMF_CONFIG` 目录。
它强烈建议您自定义的启动命令`init.fish` 文件而不是 `~/.config/omf/config.fish`,因为这可以让你保持在版本控制整个 `$OMF_CONFIG` 目录。
如果你需要的命令要在Oh My Fish开始加载插件之前执行将它们放置在 `before.init.fish`。如果你不确定,通常最好把东西放在 `init.fish` 里面
如果你需要的Starup命令来运行*之前*噢,我的鱼开始加载插件,将它们放置在 `before.init.fish` 代替。如果你不确定,通常最好把东西 `init.fish`
### 关于 bundle
@ -111,7 +110,7 @@ Oh My Fish 安装脚本会把自身启动代码加载到 fish 的配置文件 (`
## 创建插件
Oh My Fish 使用了友好的插件架构能够简化插件的开发,其中包括初始化、卸载事件和函数的自动加载。[查看相关文档](Packages.md) 获取更多信息。
Oh My Fish 使用了友好的插件架构能够简化插件的开发,其中包括初始化、卸载事件和函数的自动加载。[查看相关文档](Packages.md) 获取更多信息。
[fishshell]: http://fishshell.com

@ -1,4 +1,5 @@
<img src="https://cdn.rawgit.com/oh-my-fish/oh-my-fish/e4f1c2e0219a17e2c748b824004c8d0b38055c16/docs/logo.svg" align="left" width="128px" height="128px"/>
<img align="left" width="0" height="128px"/>
# Core Library
@ -53,4 +54,4 @@ To erase paths from autoload:
autoload -e $mypath $mypath/completions
```
[autoloading]: http://fishshell.com/docs/current/index.html#syntax-function-autoloading
[autoloading]: http://fishshell.com/docs/current/index.html#syntax-function-autoloading

@ -1,3 +1,3 @@
function git_is_dirty -d "Check if there are changes to tracked files"
git_is_worktree; and not command git diff --no-ext-diff --quiet --exit-code
git_is_repo; and not command git diff --no-ext-diff --quiet --exit-code
end

@ -1,7 +1,3 @@
function git_is_repo -d "Check if directory is a repository"
test -d .git
or begin
set -l info (command git rev-parse --git-dir --is-bare-repository 2>/dev/null)
and test $info[2] = false
end
test -d .git; or command git rev-parse --git-dir >/dev/null 2> /dev/null
end

@ -1,5 +1,5 @@
function git_is_touched -d "Check if repo has any changes"
git_is_worktree; and begin
git_is_repo; and begin
# The first checks for staged changes, the second for unstaged ones.
# We put them in this order because checking staged changes is *fast*.
not command git diff-index --cached --quiet HEAD -- >/dev/null 2>&1

@ -1,4 +0,0 @@
function git_is_worktree -d "Check if directory is inside the worktree of a repository"
git_is_repo
and test (command git rev-parse --is-inside-git-dir) = false
end

@ -1,5 +1,5 @@
function git_untracked -d "Print list of untracked files"
git_is_worktree; and begin
git_is_repo; and begin
command git ls-files --other --exclude-standard
end
end

@ -4,7 +4,7 @@ end
function __fish-spec.all_specs_finished -e all_specs_finished -a spec
set -l __fish_spec_end_time (__fish-spec.current_time)
set -l diff (math "($__fish_spec_end_time - $__fish_spec_start_time) * 0.001")
set -l diff (math --scale=3 "($__fish_spec_end_time - $__fish_spec_start_time) / 1000")
echo -en '\n\nFinished in '
printf '%g' $diff

@ -45,6 +45,6 @@ complete -c omf -f -n "__fish_seen_subcommand_from repo repositories; and __omf_
complete -c omf -f -n "__fish_seen_subcommand_from repo repositories; and __omf_assert_args_count 1" -a list -d "List installed repositories"
complete -c omf -f -n "__fish_seen_subcommand_from repo repositories; and __omf_assert_args_count 1" -a remove -d "Remove a package repository"
complete -c omf -f -a search -n "__fish_use_subcommand" -d "Search for a plugin or theme"
complete -c omf -f -a theme -n "__fish_use_subcommand" -d "Activate and list available themes"
complete -c omf -f -a theme -n "__fish_use_subcommand" -d "Install and list themes"
complete -c omf -f -a update -n "__fish_use_subcommand" -d "Update Oh My Fish"
complete -c omf -f -a version -n "__fish_use_subcommand" -d "Display version"

@ -17,16 +17,9 @@ function omf.bundle.install
test -n "$name_or_url"; or continue
set name (omf.packages.name $name_or_url)
if not contains $name $packages
omf.packages.install $name_or_url;
and begin
test $type = package
and begin
require $name
or echo "Failed to require package: $name"
end
or true
end
or set error
end
end

@ -14,11 +14,8 @@ function omf.cli.install
and require $package
# If package is a theme, set it to active.
set -l themes (omf.packages.list --theme)
if contains -- $package $themes
if contains -- $package (omf.packages.list --theme)
omf.theme.set $package
else if set -l ind (contains -i -- (omf.packages.name $package) $themes)
omf.theme.set $themes[$ind]
end
test $status != 0;

@ -21,7 +21,7 @@ function omf.cli.theme -a name
end
case '*'
echo (omf::err)"Invalid number of arguments"(omf::off) >&2
echo "Usage: $_ "(omf::em)"t"(omf::off)"heme [<theme name>]" >&2
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" [<theme name>]" >&2
return $OMF_INVALID_ARG
end
end

@ -1,5 +1,5 @@
function omf.index.path -d 'Get the path to the local package index'
set -q XDG_CACHE_HOME
and echo (echo $XDG_CACHE_HOME | sed 's:/*$::')"/omf"
or echo (echo $HOME | sed 's:/*$::')"/.cache/omf"
and echo "$XDG_CACHE_HOME/omf"
or echo "$HOME/.cache/omf"
end

@ -11,19 +11,13 @@ function __omf.packages.install.error.already
end
function omf.packages.install -a name_or_url
if set -l props (omf.index.stat $name_or_url type repository branch)
if set -l props (omf.index.stat $name_or_url type repository)
set package_type $props[1]
set name $name_or_url
set url $props[2]
set branch $props[3]
else
set name (omf.packages.name $name_or_url)
set branch ""
if string match -qi -r "^[a-z\d-]+/[a-z\d\-\._]+\$" $name_or_url
set url "https://github.com/$name_or_url"
else
set url $name_or_url
end
set url $name_or_url
end
if contains -- $name (omf.packages.list)
@ -36,14 +30,14 @@ function omf.packages.install -a name_or_url
set -l install_dir $OMF_PATH/pkg/$name
# Clone the package repository.
if not omf.repo.clone $url $branch $install_dir
if not omf.repo.clone $url $install_dir
__omf.packages.install.error "$name"
return $OMF_UNKNOWN_ERR
end
# If we don't know the package type yet, check if the package is a theme.
if not set -q package_type
test -f $install_dir/fish_prompt.fish -o -f $install_dir/functions/fish_prompt.fish
test -f $install_dir/fish_prompt.fish
and set package_type theme
or set package_type plugin
end

@ -14,8 +14,8 @@ function omf.packages.list -d 'List installed packages'
set -e show_plugins
end
set -l plugins_paths {$OMF_PATH,$OMF_CONFIG}/pkg/*
set -l themes_paths {$OMF_PATH,$OMF_CONFIG}/themes/*
set -l plugins_paths $OMF_PATH/pkg/*
set -l themes_paths $OMF_PATH/themes/*
if set -q show_plugins
for path in $plugins_paths

@ -1,3 +1,3 @@
function omf.packages.name -a name_or_url
command basename $name_or_url | sed -E 's/^(omf-)?((plugin|pkg|theme)-)?//;s/\\.git$//'
command basename $name_or_url | sed -E 's/^(omf-)?((plugin|pkg|theme)-)?//;s/.git$//'
end

@ -17,11 +17,8 @@ function omf.packages.remove -a pkg
# Run uninstall hook first.
omf.packages.run_hook $path uninstall
if test -f $path/uninstall.fish
source $path/uninstall.fish 2> /dev/null
end
emit uninstall_$pkg
emit {$pkg}_uninstall
source $path/uninstall.fish 2> /dev/null;
and emit uninstall_$pkg
if command rm -rf $path
omf.bundle.remove "package" $pkg

@ -1,11 +1,4 @@
function omf.packages.update -a name
if set -l props (omf.index.stat $name branch)
set branch $props[1]
if test -z "$branch"
set branch "master"
end
end
if not set target_path (omf.packages.path $name)
echo (omf::err)"Could not find $name."(omf::off) >&2
return 1
@ -13,7 +6,7 @@ function omf.packages.update -a name
# Only pull packages in version control
if test -e $target_path/.git
omf.repo.pull $target_path "$branch"
omf.repo.pull $target_path
switch $status
case 0
omf.bundle.install $target_path/bundle

@ -1,7 +1,3 @@
function omf.repo.clone -a url branch path
if test -z "$branch"
command git clone --quiet $url $path
else
command git clone --quiet $url -b $branch $path
end
function omf.repo.clone -a url path
command git clone --quiet $url $path
end

@ -1,10 +1,14 @@
function omf.repo.pull -a repo_dir branch
function __omf.repo.git -V repo_dir
command git -C "$repo_dir" $argv
function omf.repo.pull
if test (count $argv) -eq 0
echo (omf::err)"omf.repo.pull takes a repository path as an argument."(omf::off) >&2
return $OMF_MISSING_ARG
end
if test -z "$branch"
set branch (__omf.repo.git symbolic-ref -q --short HEAD)
set -l repo_dir $argv[1]
function __omf.repo.git -V repo_dir
command git -C "$repo_dir" $argv
end
set -l remote origin
@ -17,12 +21,12 @@ function omf.repo.pull -a repo_dir branch
set initial_revision (__omf.repo.git rev-parse -q --verify HEAD);
or return 1
# the refspec ensures that '$remote/$branch' gets updated
set -l refspec "refs/heads/$branch:refs/remotes/$remote/$branch"
# the refspec ensures that '$remote/master' gets updated
set -l refspec "refs/heads/master:refs/remotes/$remote/master"
__omf.repo.git fetch --quiet $remote $refspec;
or return 1
if test (__omf.repo.git rev-list --count "$branch"...FETCH_HEAD) -eq 0
if test (__omf.repo.git rev-list --count master...FETCH_HEAD) -eq 0
return 2
end
@ -33,8 +37,8 @@ function omf.repo.pull -a repo_dir branch
and set stashed
end
if test "$initial_branch" != "$branch"
__omf.repo.git checkout "$branch" --quiet
if test "$initial_branch" != master
__omf.repo.git checkout master --quiet
end
if not __omf.repo.git merge --ff-only --quiet FETCH_HEAD
@ -44,7 +48,7 @@ function omf.repo.pull -a repo_dir branch
return 1
end
if test "$initial_branch" != "$branch"
if test "$initial_branch" != master
__omf.repo.git checkout $initial_branch --quiet
end

@ -1,5 +1,5 @@
function omf.theme.set -a target_theme
if not test -d $OMF_PATH/themes/$target_theme -o -d $OMF_CONFIG/themes/$target_theme
if not test -d $OMF_PATH/themes/$target_theme
return $OMF_INVALID_ARG
end

@ -5,43 +5,18 @@ function describe_basic_tests
function it_has_a_help_command
set -l output (omf help)
echo $output | grep -Eq "cd.+Change to root or package directory"
echo $output | grep -Eq "channel.+Get or change the update channel"
echo $output | grep -Eq "describe.+Show information about a package"
echo $output | grep -Eq "destroy.+Uninstall Oh My Fish"
echo $output | grep -Eq "doctor.+Troubleshoot Oh My Fish"
echo $output | grep -Eq "help.+Shows help about a command"
echo $output | grep -Eq "install.+Install one or more packages"
echo $output | grep -Eq "list.+List installed packages"
echo $output | grep -Eq "new.+Create a new package from a template"
echo $output | grep -Eq "reload.+Reload the current shell"
echo $output | grep -Eq "remove.+Remove a package"
echo $output | grep -Eq "repositories.+Manage package repositories"
echo $output | grep -Eq "search.+Search for a package or theme"
echo $output | grep -Eq "theme.+Activate and list available themes"
echo $output | grep -Eq "update.+Update Oh My Fish"
echo $output | grep -Eq "version.+Display version and exit"
assert 0 = $status
end
function it_has_a_doctor_command
set -l output (omf doctor)
assert 0 = $status
assert -n (echo $output | grep "Oh My Fish version")
assert -n (echo $output | grep "Checking for a sane environment...")
end
function it_installs_packages
set -l remove_output (omf remove apt 2> /dev/null)
function it_install_packages
set -l remove_output (omf remove apt 2> /dev/null)
set -l install_output (omf install apt)
assert 0 = $status
assert -n (echo $install_output | grep "apt successfully installed.")
end
function it_removes_packages
set -l install_output (omf install apt 2> /dev/null)
set -l remove_output (omf remove apt)
assert 0 = $status
assert -n (echo $remove_output | grep -q "apt successfully removed.")
end
end

@ -1,32 +0,0 @@
function describe_omf_list_tests
function before_all
set -gx CI WORKAROUND
end
function it_can_list_plugins
set -l list_output (omf list -p)
assert 0 = $status
assert "$list_output" = "fish-spec omf"
end
function it_can_list_themes
set -l list_output (omf list -t)
assert 0 = $status
assert "$list_output" = "default"
end
function it_can_list_insttalled_plugins
set -l output (omf remove apt 2> /dev/null)
set -l output (omf install apt 2> /dev/null)
set -l list_output (omf list -p)
assert 0 = $status
assert "$list_output" = "apt fish-spec omf"
set -l output (omf remove apt 2> /dev/null)
end
function it_can_list_themes
set -l list_output (omf list -t)
assert 0 = $status
assert "$list_output" = "default"
end
end

@ -1,77 +0,0 @@
function describe_omf_packages_tests
function before_all
set -gx CI WORKAROUND
end
function it_can_extract_name_from_name
set -l output (omf.packages.name foo)
assert 0 = $status
assert "foo" = "$output"
end
function it_can_extract_name_of_a_plugin_package
set -l output (omf.packages.name plugin-foo)
assert 0 = $status
assert "foo" = "$output"
end
function it_can_extract_name_of_a_theme_package
set -l output (omf.packages.name theme-foo)
assert 0 = $status
assert "foo" = "$output"
end
function it_can_extract_name_from_name_ended_in_dot_git
set -l output (omf.packages.name foo.git)
assert 0 = $status
assert "foo" = "$output"
end
function it_can_extract_name_from_name_with_dot
set -l output (omf.packages.name foo.bar)
assert 0 = $status
assert "foo.bar" = "$output"
end
function it_can_extract_name_from_name_ended_in_git
set -l output (omf.packages.name foobargit)
assert 0 = $status
assert "foobargit" = "$output"
end
function it_can_extract_name_from_url
set -l output (omf.packages.name http://github.com/user/foo)
assert 0 = $status
assert "foo" = "$output"
end
function it_can_extract_name_from_url_of_a_plugin_package
set -l output (omf.packages.name http://github.com/user/plugin-foo)
assert 0 = $status
assert "foo" = "$output"
end
function it_can_extract_name_from_url_of_a_theme_package
set -l output (omf.packages.name http://github.com/user/theme-foo)
assert 0 = $status
assert "foo" = "$output"
end
function it_can_extract_name_from_url_ended_in_dot_git
set -l output (omf.packages.name http://github.com/user/foo.git)
assert 0 = $status
assert "foo" = "$output"
end
function it_can_extract_name_from_url_with_dot
set -l output (omf.packages.name http://github.com/user/foo.bar)
assert 0 = $status
assert "foo.bar" = "$output"
end
function it_can_extract_name_from_url_ended_in_git
set -l output (omf.packages.name http://github.com/user/foobargit)
assert 0 = $status
assert "foobargit" = "$output"
end
end

@ -1,26 +0,0 @@
#!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
if [[ $FISH_RELEASE = "brew" ]]; then
brew update
brew install fish
else
if [[ $FISH_RELEASE == "2" ]]; then
REPO_PPA="ppa:fish-shell/release-2"
else
REPO_PPA="ppa:fish-shell/release-3"
fi
if [[ $FISH_RELEASE != "stock" ]]; then
sudo apt-add-repository -y $REPO_PPA
fi
sudo apt-cache policy fish
sudo apt-get update
sudo apt-get install -y fish
fi
fish --version

@ -1,27 +1,11 @@
#!/usr/bin/env fish
# This is meant to be run from the root:
#
# ./tools/generate-themes-doc.fish > docs/NewThemes.md
#
# Prior to running it, check out packages-main repository alongside oh-my-fish.
# If it's checked out at another location, you can specify it with the only
# optional argument
#
# ./tools/generate-themes-doc.fish /full-or-rel-path/packages-main > docs/NewThemes.md
#
set TOC_TBL_COLS 7
set -l project_dir (status -f|xargs dirname|xargs dirname)
if [ $argv ]
set packages "$argv/packages"
set theme_doc $argv
else
set packages "../packages-main/packages"
set theme_doc "$project_dir/docs/Themes.md"
end
type -q gsed; and alias sed gsed
type -q gmktemp; and alias mktemp gmktemp
set temp_theme_contents (mktemp /tmp/fish.Themes.Content.XXXXX.md)
set temp_theme_toc (mktemp /tmp/fish.Themes.TOC.XXXXX.md)
@ -47,45 +31,19 @@ function __find_readme -a raw_content
end
end
function __write_toc
set -l total (count $argv)
echo "Processing $total themes..." >&2
set -l table_rows (math "ceil($total / $TOC_TBL_COLS)")
echo "Creating a $table_rows-row table" >&2
echo "<details>" >> $temp_theme_toc
echo "<summary><big><strong>Expand for a table of themes</strong></big></summary>" >> $temp_theme_toc
echo "<table><tr><td>" >> $temp_theme_toc
set -l i 0
for i in (seq (math "$table_rows x $TOC_TBL_COLS"))
test -z "$argv[$i]"
and echo " <br/>" >> $temp_theme_toc
and continue
set -l name (basename $argv[$i])
echo " <a href=\"#$name\">$name</a><br/>" >> $temp_theme_toc
test (math "$i % $table_rows") = 0
and test $i != $total
and echo "</td><td>" >> $temp_theme_toc
end
echo "</td></tr></table>" >> $temp_theme_toc
echo "</details>" >> $temp_theme_toc
echo -e "\n***" >> $temp_theme_toc
end
echo -e "# Available themes\n" > $temp_theme_toc
echo -e "<!-- ATTENTION: This file is auto-generated! Changes will be lost! -->\n" >> $temp_theme_toc
set -l themes (command grep -r -l "type = theme" $packages | sort)
__write_toc $themes
echo "Generating Themes documentation to $theme_doc ..."
echo "# Available themes" > $temp_theme_toc
for theme in $themes
for theme in (command find $project_dir/db/themes/ -type f|sort)
set -l name (basename $theme)
set -l url (grep repository $theme | string replace "repository = " "")
read -l url < $theme
set -l raw_content (echo $url | sed -r 's#\.git$#/#i; s#https://github.com/([-.a-z0-9]+)/([-.a-z0-9]+)#https://raw.githubusercontent.com/\1/\2/master#i')
set -l readme (__find_readme $raw_content)
echo "# [$name]("$url")" >> $temp_theme_contents
echo "- [$name](#$name)" >> $temp_theme_toc
echo "# $name" >> $temp_theme_contents
if [ $readme ]
echo "Fetching readme for $name" >&2
echo "Fetching readme for $name"
__write_theme_readme $name $raw_content $readme
else
echo "FAILED: No readme for $name" >&2
@ -96,8 +54,8 @@ end
echo "" >> $temp_theme_toc
cat $temp_theme_contents >> $temp_theme_toc
rm -f $theme_doc
cat $temp_theme_toc
echo "All done!" >&2
cat $temp_theme_toc >> $theme_doc
echo "All done: $theme_doc"
rm $temp_theme_contents
rm $temp_theme_toc

@ -0,0 +1,17 @@
# Return if we are not in a Pull Request
if [[ "$TRAVIS_PULL_REQUEST" = "false" ]]; then
export OMF_REPO_URI="https://github.com/$TRAVIS_REPO_SLUG"
export OMF_REPO_BRANCH="$TRAVIS_BRANCH"
return
fi
GITHUB_PR_URL=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST
GITHUB_PR_BODY=$(curl -s $GITHUB_PR_URL 2> /dev/null)
if [[ $GITHUB_PR_BODY =~ \"ref\":\ *\"([a-zA-Z0-9_-]*)\" ]]; then
export OMF_REPO_BRANCH=${BASH_REMATCH[1]}
fi
if [[ $GITHUB_PR_BODY =~ \"repo\":.*\"clone_url\":\ *\"(https://github\.com/[a-zA-Z0-9_-]*/[a-zA-Z0-9_-]*\.git).*\"base\" ]]; then
export OMF_REPO_URI=${BASH_REMATCH[1]}
fi

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
#set -o xtrace
# Return if we are not in a Pull Request
if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then
sudo apt-add-repository -y ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install -y fish
else
brew update
brew install fish tree
fi

@ -0,0 +1,7 @@
#!/usr/bin/env bash
if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install --only-upgrade -y git
fi
Loading…
Cancel
Save