mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
Compare commits
56 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
62204b02c3 | ||
|
245d13b38d | ||
|
d427501b2c | ||
|
90f875e02d | ||
|
55da5f7b6f | ||
|
252566fd68 | ||
|
0eeacf0684 | ||
|
dc9d2c32d5 | ||
|
8ad49c583b | ||
|
37a208177e | ||
|
5e1a4bfc47 | ||
|
32a7e595be | ||
|
d428b723c8 | ||
|
029a67518d | ||
|
0cda2c0c1f | ||
|
b27b3b5aba | ||
|
ab05441000 | ||
|
446a94a766 | ||
|
700f7cad54 | ||
|
7aee034a80 | ||
|
05616d85e9 | ||
|
da109ff44e | ||
|
59de68c4ca | ||
|
0b1396ad79 | ||
|
a17107e186 | ||
|
53d37a9893 | ||
|
f959596189 | ||
|
9886b88d66 | ||
|
3eb76e105f | ||
|
45bde32fda | ||
|
be7e05bf46 | ||
|
4f40aee133 | ||
|
58a9ac6609 | ||
|
ac1c980a76 | ||
|
79e1b05494 | ||
|
dff781c080 | ||
|
85afe3c41d | ||
|
1c14af38b9 | ||
|
b2643e95a2 | ||
|
df20117be7 | ||
|
747ac1d142 | ||
|
f8e09ca604 | ||
|
0a32584476 | ||
|
b1b10c333d | ||
|
e7a8e74f19 | ||
|
ea1119c61d | ||
|
ba8b282333 | ||
|
bba7ef44c2 | ||
|
bb390cdc22 | ||
|
bc4239e012 | ||
|
0d2da353bd | ||
|
49e190df66 | ||
|
a5ca1fbe46 | ||
|
4ff9981ac2 | ||
|
62a051a201 | ||
|
823b6a79a8 |
56
.github/workflows/build.yml
vendored
Normal file
56
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
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
|
43
.travis.yml
43
.travis.yml
@ -1,43 +0,0 @@
|
|||||||
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,6 +247,7 @@ Thanks to the people who contributed to this release.
|
|||||||
[4]: https://github.com/oh-my-fish/oh-my-fish/releases/tag/v4
|
[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
|
[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
|
[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
|
[#191]: https://github.com/oh-my-fish/oh-my-fish/issues/191
|
||||||
[#217]: https://github.com/oh-my-fish/oh-my-fish/issues/217
|
[#217]: https://github.com/oh-my-fish/oh-my-fish/issues/217
|
||||||
[#235]: https://github.com/oh-my-fish/oh-my-fish/pull/235
|
[#235]: https://github.com/oh-my-fish/oh-my-fish/pull/235
|
||||||
|
26
README.md
26
README.md
@ -1,19 +1,22 @@
|
|||||||
|
> ⚠️ Oh My Fish has been unmaintained for years, and certain parts of it may not work for you. A few themes and packages are currently broken, and the code is due a significant overhaul. The current set of maintainers have ran out of steam, so if you are interested in becoming a maintainer send an email to *oh-my-fish [at] googlegroups.com*.
|
||||||
|
|
||||||
<img src="https://cdn.rawgit.com/oh-my-fish/oh-my-fish/e4f1c2e0219a17e2c748b824004c8d0b38055c16/docs/logo.svg" align="left" width="192px" height="192px"/>
|
<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"/>
|
<img align="left" width="0" height="192px" hspace="10"/>
|
||||||
|
|
||||||
> The <a href="http://fishshell.com">Fishshell</a> Framework
|
> 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) [![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)
|
[![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)
|
||||||
|
|
||||||
|
|
||||||
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.
|
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
|
> Also in
|
||||||
> <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>
|
|
||||||
> <a href="docs/es-ES/README.md">🇪🇸</a>
|
> <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>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -30,20 +33,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:
|
You can get started right away with the default setup by running this in your terminal:
|
||||||
|
|
||||||
```fish
|
```fish
|
||||||
curl -L https://get.oh-my.fish | fish
|
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
|
||||||
```
|
```
|
||||||
|
|
||||||
This will download the installer script and start the installation. Alternatively, you can download the installer and customize your install:
|
This will download the installer script and start the installation. Alternatively, you can download the installer and customize your install:
|
||||||
|
|
||||||
```fish
|
```fish
|
||||||
curl -L https://get.oh-my.fish > install
|
curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install
|
||||||
fish install --path=~/.local/share/omf --config=~/.config/omf
|
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):
|
You can verify the integrity of the downloaded installer by verifying the script against [this checksum](bin/install.sha256):
|
||||||
|
|
||||||
```
|
```
|
||||||
bb1f4025934600ea6feef2ec11660e17e2b6449c5a23c033860aed712ad328c9 install
|
curl -sL https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install.sha256 | shasum -a 256 --check
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also install Oh My Fish with Git or with an offline source tarball downloaded from the [releases page][releases]:
|
You can also install Oh My Fish with Git or with an offline source tarball downloaded from the [releases page][releases]:
|
||||||
@ -54,7 +57,7 @@ $ git clone https://github.com/oh-my-fish/oh-my-fish
|
|||||||
$ cd oh-my-fish
|
$ cd oh-my-fish
|
||||||
$ bin/install --offline
|
$ bin/install --offline
|
||||||
# with a tarball
|
# with a tarball
|
||||||
$ curl -L https://get.oh-my.fish > install
|
$ curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install
|
||||||
$ fish install --offline=omf.tar.gz
|
$ fish install --offline=omf.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -85,11 +88,12 @@ Update Oh My Fish, all package repositories, and all installed packages.
|
|||||||
- For selective package update, list only the names of packages you wish to
|
- 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.
|
update. You may still include "omf" in the list to update the core as well.
|
||||||
|
|
||||||
#### `omf install` _`[<name>|<url>]`_
|
#### `omf install` _`[<name>|<url>|<user/repo>]`_
|
||||||
|
|
||||||
Install one _or more_ packages.
|
Install one _or more_ packages.
|
||||||
|
|
||||||
- You can install packages directly by URL via `omf install URL`
|
- 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).
|
- When called without arguments, install missing packages from [bundle](#dotfiles).
|
||||||
|
|
||||||
#### `omf repositories` _`[list|add|remove]`_
|
#### `omf repositories` _`[list|add|remove]`_
|
||||||
@ -106,7 +110,7 @@ Apply a theme. To list available themes, type `omf theme`. You can also [preview
|
|||||||
|
|
||||||
#### `omf remove` _`<name>`_
|
#### `omf remove` _`<name>`_
|
||||||
|
|
||||||
Remove a theme or package.
|
Remove a theme or package. If a package was installed via `user/repo`, use `repo` for `name`.
|
||||||
|
|
||||||
> 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.
|
> 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.
|
||||||
|
|
||||||
|
23
SECURITY.md
Normal file
23
SECURITY.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# 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. -->
|
12
bin/install
12
bin/install
@ -54,13 +54,13 @@ Options:
|
|||||||
set -g OMF_CHANNEL dev
|
set -g OMF_CHANNEL dev
|
||||||
|
|
||||||
case '--channel=*'
|
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
|
case --check
|
||||||
set -g CHECK_ONLY
|
set -g CHECK_ONLY
|
||||||
|
|
||||||
case '--config=*'
|
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
|
case --noninteractive
|
||||||
set -g NONINTERACTIVE
|
set -g NONINTERACTIVE
|
||||||
@ -70,10 +70,10 @@ Options:
|
|||||||
|
|
||||||
case '--offline=*'
|
case '--offline=*'
|
||||||
set -g 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=*'
|
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
|
case --uninstall
|
||||||
set -g UNINSTALL
|
set -g UNINSTALL
|
||||||
@ -225,7 +225,9 @@ function install_offline
|
|||||||
if test -f "$OFFLINE_PATH"
|
if test -f "$OFFLINE_PATH"
|
||||||
say "Offline path is a file, assuming tar archive..."
|
say "Offline path is a file, assuming tar archive..."
|
||||||
|
|
||||||
command tar -xf "$OFFLINE_PATH" -C "$OMF_PATH"
|
mkdir -p "$OMF_PATH"
|
||||||
|
|
||||||
|
command tar -xf "$OFFLINE_PATH" -C "$OMF_PATH" --strip-components=1
|
||||||
or abort "Could not extract tar file $OFFLINE_PATH"
|
or abort "Could not extract tar file $OFFLINE_PATH"
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -1 +1 @@
|
|||||||
bb1f4025934600ea6feef2ec11660e17e2b6449c5a23c033860aed712ad328c9 install
|
429a76e5b5e692c921aa03456a41258b614374426f959535167222a28b676201 install
|
||||||
|
2581
docs/Themes.md
2581
docs/Themes.md
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.
|
<<remove.adoc#,**r**emove>>:: Remove a package.
|
||||||
<<repositories.adoc#,**repo**sitories>>:: Manage package repositories.
|
<<repositories.adoc#,**repo**sitories>>:: Manage package repositories.
|
||||||
<<search.adoc#,**s**earch>>:: Search for a package or theme.
|
<<search.adoc#,**s**earch>>:: Search for a package or theme.
|
||||||
<<theme.adoc#,**t**heme>>:: Install and list themes.
|
<<theme.adoc#,**t**heme>>:: Activate and list available themes.
|
||||||
<<update.adoc#,**u**pdate>>:: Update Oh My Fish.
|
<<update.adoc#,**u**pdate>>:: Update Oh My Fish.
|
||||||
<<version.adoc#,**version**>>:: Display version and exit.
|
<<version.adoc#,**version**>>:: Display version and exit.
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Install and list themes.
|
Activate and list available themes.
|
||||||
|
|
||||||
== USAGE
|
== USAGE
|
||||||
omf theme List available themes to install
|
omf theme List available and installed themes
|
||||||
omf theme <name> Install theme by name
|
omf theme <name> Activate theme by name
|
||||||
|
|
||||||
== EXAMPLES
|
== EXAMPLES
|
||||||
omf theme
|
omf theme
|
||||||
|
@ -4,10 +4,13 @@
|
|||||||
# FAQ
|
# FAQ
|
||||||
|
|
||||||
> Oh My Fish Documentation • Also in
|
> Oh My Fish Documentation • Also in
|
||||||
> <a href="../ru-RU/FAQ.md">🇷🇺</a>
|
> <a href="../es-ES/FAQ.md">🇪🇸</a>
|
||||||
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
|
> <a href="../nl-NL/FAQ.md">🇳🇱</a>
|
||||||
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
|
|
||||||
> <a href="../pt-BR/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>
|
<br>
|
||||||
|
|
||||||
Thanks for taking the time to read this FAQ. Feel free to create a new issue if your question is not answered here.
|
Thanks for taking the time to read this FAQ. Feel free to create a new issue if your question is not answered here.
|
||||||
|
@ -4,10 +4,13 @@
|
|||||||
# Packages
|
# Packages
|
||||||
|
|
||||||
> Oh My Fish Documentation • Also in
|
> Oh My Fish Documentation • Also in
|
||||||
> <a href="../ru-RU/Packages.md">🇷🇺</a>
|
> <a href="../es-ES/Packages.md">🇪🇸</a>
|
||||||
> <a href="../zh-CN/Packages.md">🇨🇳</a>
|
> <a href="../nl-NL/Packages.md">🇳🇱</a>
|
||||||
> <a href="../uk-UA/Packages.md">🇺🇦</a>
|
|
||||||
> <a href="../pt-BR/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>
|
<br>
|
||||||
|
|
||||||
# Creating
|
# Creating
|
||||||
@ -117,6 +120,7 @@ Inside this hook, you can access two package-related variables:
|
|||||||
Packages can use this hook to clean up custom resources, etc.
|
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.
|
> 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
|
# Make it public
|
||||||
|
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
> La documentación de Oh My Fish • También disponible en
|
> La documentación de Oh My Fish • También disponible en
|
||||||
> <a href="../en-US/FAQ.md">🇺🇸</a>
|
> <a href="../en-US/FAQ.md">🇺🇸</a>
|
||||||
> <a href="../ru-RU/FAQ.md">🇷🇺</a>
|
> <a href="../nl-NL/FAQ.md">🇳🇱</a>
|
||||||
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
|
|
||||||
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
|
|
||||||
> <a href="../pt-BR/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>
|
<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
|
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,10 +5,12 @@
|
|||||||
|
|
||||||
> La documentación de Oh My Fish • También disponible en
|
> La documentación de Oh My Fish • También disponible en
|
||||||
> <a href="../en-US/Packages.md">🇺🇸</a>
|
> <a href="../en-US/Packages.md">🇺🇸</a>
|
||||||
> <a href="../ru-RU/Packages.md">🇷🇺</a>
|
> <a href="../nl-NL/Packages.md">🇳🇱</a>
|
||||||
> <a href="../zh-CN/Packages.md">🇨🇳</a>
|
|
||||||
> <a href="../uk-UA/Packages.md">🇺🇦</a>
|
|
||||||
> <a href="../pt-BR/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>
|
<br>
|
||||||
|
|
||||||
# Creando
|
# Creando
|
||||||
|
@ -10,11 +10,12 @@ Oh My Fish ofrece la infraestructura básica para permitirle instalar paquetes q
|
|||||||
sencillo de utilizar.
|
sencillo de utilizar.
|
||||||
|
|
||||||
> También disponible en
|
> También disponible en
|
||||||
> <a href="../en-US/FAQ.md">🇺🇸</a>
|
> <a href="../../README.md">🇺🇸</a>
|
||||||
> <a href="docs/ru-RU/README.md">🇷🇺</a>
|
> <a href="../nl-NL/README.md">🇳🇱</a>
|
||||||
> <a href="docs/zh-CN/README.md">🇨🇳</a>
|
> <a href="../pt-BR/README.md">🇧🇷</a>
|
||||||
> <a href="docs/uk-UA/README.md">🇺🇦</a>
|
> <a href="../ru-RU/README.md">🇷🇺</a>
|
||||||
> <a href="docs/pt-BR/README.md">🇧🇷</a>
|
> <a href="../uk-UA/README.md">🇺🇦</a>
|
||||||
|
> <a href="../zh-CN/README.md">🇨🇳</a>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ sencillo de utilizar.
|
|||||||
* [Comenzando (descripciones de los comandos)](#comenzando)
|
* [Comenzando (descripciones de los comandos)](#comenzando)
|
||||||
* [Avanzado](#avanzado)
|
* [Avanzado](#avanzado)
|
||||||
* [Inicio](#inicio)
|
* [Inicio](#inicio)
|
||||||
* [Archivos de configuración (Dotfiles)](#dotfiles)
|
* [Archivos de configuración (Dotfiles)](#archivos-de-configuraci%C3%B3n-dotfiles)
|
||||||
* [Creando paquetes](#creando-paquetes)
|
* [Creando paquetes](#creando-paquetes)
|
||||||
|
|
||||||
## Instalación
|
## Instalación
|
||||||
@ -41,13 +42,13 @@ curl -L https://get.oh-my.fish > install
|
|||||||
fish install --path=~/.local/share/omf --config=~/.config/omf
|
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):
|
||||||
|
|
||||||
```
|
```
|
||||||
434264c56e3a7bb74733d9b293d72403c404e0a0bded3e632433d391d302504e install
|
bb1f4025934600ea6feef2ec11660e17e2b6449c5a23c033860aed712ad328c9 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
|
```fish
|
||||||
# with git
|
# with git
|
||||||
@ -91,7 +92,7 @@ Actualiza Oh My Fish, todos los paquetes de los repositorios y todos los paquete
|
|||||||
Instala uno _o más_ paquetes.
|
Instala uno _o más_ paquetes.
|
||||||
|
|
||||||
- Puede instalar paquetes directamente con la URL mediante `omf install URL`
|
- Puede instalar paquetes directamente con la URL mediante `omf install URL`
|
||||||
- Cuando es ejecutado sin argumentos, instala paquetes faltantes desde [bundle](#dotfiles).
|
- Cuando es ejecutado sin argumentos, instala paquetes faltantes desde [bundle](#archivos-de-configuraci%C3%B3n-dotfiles).
|
||||||
|
|
||||||
#### `omf repositories` _`[list|add|remove]`_
|
#### `omf repositories` _`[list|add|remove]`_
|
||||||
|
|
||||||
@ -165,7 +166,7 @@ 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
|
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.
|
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).
|
Para más información puede consultar la sección de preguntas frecuentes [FAQ](FAQ.md#qué-hace-oh-my-fish-exactamente).
|
||||||
|
92
docs/nl-NL/FAQ.md
Normal file
92
docs/nl-NL/FAQ.md
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
<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 • 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
|
||||||
|
```
|
130
docs/nl-NL/Packages.md
Normal file
130
docs/nl-NL/Packages.md
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
<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 • 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
|
210
docs/nl-NL/README.md
Normal file
210
docs/nl-NL/README.md
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
<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
|
||||||
|
> <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,9 +5,11 @@
|
|||||||
|
|
||||||
> Documentação do Oh My Fish • Also in
|
> Documentação do Oh My Fish • Also in
|
||||||
> <a href="../en-US/FAQ.md">🇺🇸</a>
|
> <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="../ru-RU/FAQ.md">🇷🇺</a>
|
||||||
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
|
|
||||||
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
|
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
|
||||||
|
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
@ -5,9 +5,11 @@
|
|||||||
|
|
||||||
> Documentação do Oh My Fish • Also in
|
> Documentação do Oh My Fish • Also in
|
||||||
> <a href="../en-US/Packages.md">🇺🇸</a>
|
> <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="../ru-RU/Packages.md">🇷🇺</a>
|
||||||
> <a href="../zh-CN/Packages.md">🇨🇳</a>
|
|
||||||
> <a href="../uk-UA/Packages.md">🇺🇦</a>
|
> <a href="../uk-UA/Packages.md">🇺🇦</a>
|
||||||
|
> <a href="../zh-CN/Packages.md">🇨🇳</a>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
@ -11,10 +11,11 @@ O Oh My Fish fornece infra-estrutura básica para permitir que você instale pac
|
|||||||
|
|
||||||
> Also in
|
> Also in
|
||||||
> <a href="../../README.md">🇺🇸</a>
|
> <a href="../../README.md">🇺🇸</a>
|
||||||
> <a href="../ru-RU/README.md">🇷🇺</a>
|
|
||||||
> <a href="../zh-CN/README.md">🇨🇳</a>
|
|
||||||
> <a href="../uk-UA/README.md">🇺🇦</a>
|
|
||||||
> <a href="../es-ES/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>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ Lista dos pacotes instalados.
|
|||||||
|
|
||||||
#### `omf theme` _`<theme>`_
|
#### `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>`_
|
#### `omf remove` _`<name>`_
|
||||||
|
|
||||||
|
@ -5,9 +5,11 @@
|
|||||||
|
|
||||||
> Oh My Fish Documentation • Also in
|
> Oh My Fish Documentation • Also in
|
||||||
> <a href="../en-US/FAQ.md">🇺🇸</a>
|
> <a href="../en-US/FAQ.md">🇺🇸</a>
|
||||||
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
|
> <a href="../es-ES/FAQ.md">🇪🇸</a>
|
||||||
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
|
> <a href="../nl-NL/FAQ.md">🇳🇱</a>
|
||||||
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
|
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
|
||||||
|
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
|
||||||
|
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
@ -5,9 +5,13 @@
|
|||||||
|
|
||||||
> Oh My Fish Documentation • Also in
|
> Oh My Fish Documentation • Also in
|
||||||
> <a href="../en-US/Packages.md">🇺🇸</a>
|
> <a href="../en-US/Packages.md">🇺🇸</a>
|
||||||
> <a href="../zh-CN/Packages.md">🇨🇳</a>
|
> <a href="../es-ES/Packages.md">🇪🇸</a>
|
||||||
> <a href="../uk-UA/Packages.md">🇺🇦</a>
|
> <a href="../nl-NL/Packages.md">🇳🇱</a>
|
||||||
> <a href="../pt-BR/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>
|
||||||
|
|
||||||
# Создание
|
# Создание
|
||||||
|
|
||||||
|
@ -9,10 +9,11 @@ Oh My Fish обеспечивает базовую инфраструктуру,
|
|||||||
|
|
||||||
> Also in
|
> Also in
|
||||||
> <a href="../../README.md">🇺🇸</a>
|
> <a href="../../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>
|
> <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>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
@ -5,9 +5,11 @@
|
|||||||
|
|
||||||
> Oh My Fish Documentation • Also in
|
> Oh My Fish Documentation • Also in
|
||||||
> <a href="../en-US/FAQ.md">🇺🇸</a>
|
> <a href="../en-US/FAQ.md">🇺🇸</a>
|
||||||
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
|
> <a href="../es-ES/FAQ.md">🇪🇸</a>
|
||||||
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
|
> <a href="../nl-NL/FAQ.md">🇳🇱</a>
|
||||||
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
|
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
|
||||||
|
> <a href="../ru-RU/FAQ.md">🇷🇺</a>
|
||||||
|
> <a href="../zh-CN/FAQ.md">🇨🇳</a>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
@ -5,9 +5,13 @@
|
|||||||
|
|
||||||
> Oh My Fish Documentation • Also in
|
> Oh My Fish Documentation • Also in
|
||||||
> <a href="../en-US/Packages.md">🇺🇸</a>
|
> <a href="../en-US/Packages.md">🇺🇸</a>
|
||||||
> <a href="../zh-CN/Packages.md">🇨🇳</a>
|
> <a href="../es-ES/Packages.md">🇪🇸</a>
|
||||||
> <a href="../uk-UA/Packages.md">🇺🇦</a>
|
> <a href="../nl-NL/Packages.md">🇳🇱</a>
|
||||||
> <a href="../pt-BR/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>
|
||||||
|
|
||||||
# Створення
|
# Створення
|
||||||
|
|
||||||
|
@ -9,10 +9,11 @@ Oh My Fish надає базову інфраструктуру, щоб забе
|
|||||||
|
|
||||||
> Also in
|
> Also in
|
||||||
> <a href="../../README.md">🇺🇸</a>
|
> <a href="../../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>
|
> <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>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ Oh My Fish містить невелику утиліту `omf` для зава
|
|||||||
Встановлює один _або більше_ пакетів.
|
Встановлює один _або більше_ пакетів.
|
||||||
|
|
||||||
- Ви можете встановити пакети по URL за допомогою команди `omf install URL`
|
- Ви можете встановити пакети по URL за допомогою команди `omf install URL`
|
||||||
- Коли викликається без аргументів, встановлює відсутні пакети із [bundle](#Файли-конфигурації).
|
- Коли викликається без аргументів, встановлює відсутні пакети із [bundle](#Файли-конфігурації).
|
||||||
|
|
||||||
#### `omf list`
|
#### `omf list`
|
||||||
|
|
||||||
@ -81,7 +82,7 @@ Oh My Fish містить невелику утиліту `omf` для зава
|
|||||||
|
|
||||||
# Для досвідчених
|
# Для досвідчених
|
||||||
|
|
||||||
Встановлювач Oh My Fish поміщає код для стартау у вашому файлі конфігурації (`~/.config/fish/config.fish`).
|
Встановлювач Oh My Fish поміщає код для старта у вашому файлі конфігурації (`~/.config/fish/config.fish`).
|
||||||
|
|
||||||
## Стартап
|
## Стартап
|
||||||
|
|
||||||
|
@ -5,9 +5,12 @@
|
|||||||
|
|
||||||
> Oh My Fish Documentation • Also in
|
> Oh My Fish Documentation • Also in
|
||||||
> <a href="../en-US/FAQ.md">🇺🇸</a>
|
> <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="../ru-RU/FAQ.md">🇷🇺</a>
|
||||||
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
|
> <a href="../uk-UA/FAQ.md">🇺🇦</a>
|
||||||
> <a href="../pt-BR/FAQ.md">🇧🇷</a>
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
感谢您花一些时间来阅读 FAQ。如果没有从下面找到你想问的问题欢迎给我们提交新的问题(Issue)。
|
感谢您花一些时间来阅读 FAQ。如果没有从下面找到你想问的问题欢迎给我们提交新的问题(Issue)。
|
||||||
|
@ -5,9 +5,12 @@
|
|||||||
|
|
||||||
> Oh My Fish Documentation • Also in
|
> Oh My Fish Documentation • Also in
|
||||||
> <a href="../en-US/Packages.md">🇺🇸</a>
|
> <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="../ru-RU/Packages.md">🇷🇺</a>
|
||||||
> <a href="../uk-UA/Packages.md">🇺🇦</a>
|
> <a href="../uk-UA/Packages.md">🇺🇦</a>
|
||||||
> <a href="../pt-BR/Packages.md">🇧🇷</a>
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
# 创建插件或主题
|
# 创建插件或主题
|
||||||
|
@ -9,10 +9,11 @@ Oh My Fish 提供核心基础设施的配置,允许每个人可以轻松安装
|
|||||||
|
|
||||||
> Also in
|
> Also in
|
||||||
> <a href="../../README.md">🇺🇸</a>
|
> <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="../ru-RU/README.md">🇷🇺</a>
|
||||||
> <a href="../uk-UA/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>
|
<br>
|
||||||
|
|
||||||
@ -42,8 +43,8 @@ Oh My Fish 自带的辅助命令工具 `omf` 可以帮助你快速获取安装
|
|||||||
|
|
||||||
安装 _一个或多个_ 插件。
|
安装 _一个或多个_ 插件。
|
||||||
|
|
||||||
- 你可以通过输入指定的 URL 直接安装插件 `omf install URL`
|
- 你可以通过输入指定的 URL 直接从`URL`安装插件。例子:`omf install url`
|
||||||
- 当没有执行没有传入任何参数,将会从 [bundle](#dotfiles) 文件检索并安装本地尚未安装的插件和主题。
|
- 执行时没有传入任何参数时,Oh My Fish将会从 [bundle](#dotfiles) 文件检索并安装本地尚未安装的插件和主题。
|
||||||
|
|
||||||
#### `omf list`
|
#### `omf list`
|
||||||
|
|
||||||
@ -57,13 +58,13 @@ Oh My Fish 自带的辅助命令工具 `omf` 可以帮助你快速获取安装
|
|||||||
|
|
||||||
移除主题或插件。
|
移除主题或插件。
|
||||||
|
|
||||||
> 包可以使用卸载挂钩,所以资源的自定义清理可以做到卸载时。有关更多信息,请参见 [卸载](Packages.md#uninstall) 。
|
> 包可以使用卸载钩子,所以资源的自定义清理可以在卸载时进行。有关更多信息,请参见 [卸载](Packages.md#卸载) 。
|
||||||
|
|
||||||
#### `omf new pkg | theme` _`<name>`_
|
#### `omf new pkg | theme` _`<name>`_
|
||||||
|
|
||||||
创建新插件和主题的生成工具。
|
创建新插件和主题的生成工具。
|
||||||
|
|
||||||
> 创建的模板会新创建并保存于 `$OMF_CONFIG/{pkg | themes}/` 文件夹下面。
|
> 从模板创建新的插件/主题并保存于 `$OMF_CONFIG/{pkg | themes}/` 文件夹下面。
|
||||||
|
|
||||||
#### `omf submit` _`pkg/<name>`_ _`[<url>]`_
|
#### `omf submit` _`pkg/<name>`_ _`[<url>]`_
|
||||||
|
|
||||||
@ -74,7 +75,7 @@ Oh My Fish 自带的辅助命令工具 `omf` 可以帮助你快速获取安装
|
|||||||
|
|
||||||
#### `omf doctor`
|
#### `omf doctor`
|
||||||
|
|
||||||
使用前[开馆问题][omf-issues-new] 解决。
|
使用前[打开一个新的issue][omf-issues-new]。
|
||||||
|
|
||||||
#### `omf destroy`
|
#### `omf destroy`
|
||||||
|
|
||||||
@ -91,7 +92,7 @@ Oh My Fish 安装脚本会把自身启动代码加载到 fish 的配置文件 (`
|
|||||||
|
|
||||||
## Dotfiles
|
## Dotfiles
|
||||||
|
|
||||||
`$OMF_CONFIG` 目录存储用户使用 Oh My Fish 的重要配置参数,这是最完美的方式把该目录的所有文件加入你的 dotfiles 或加入到版本控制。
|
`$OMF_CONFIG` 目录存储用户使用 Oh My Fish 的重要配置参数,这是把该目录的所有文件加入你的 dotfiles 或加入到版本控制的最完美的方式。
|
||||||
有四个重要文件:
|
有四个重要文件:
|
||||||
|
|
||||||
- __`theme`__ - 当前主题
|
- __`theme`__ - 当前主题
|
||||||
@ -99,9 +100,9 @@ Oh My Fish 安装脚本会把自身启动代码加载到 fish 的配置文件 (`
|
|||||||
- __`init.fish`__ - 壳开始后执行的自定义脚本
|
- __`init.fish`__ - 壳开始后执行的自定义脚本
|
||||||
- __`before.init.fish`__ - 壳开始前执行的自定义脚本
|
- __`before.init.fish`__ - 壳开始前执行的自定义脚本
|
||||||
|
|
||||||
它强烈建议您自定义的启动命令进入 `init.fish` 文件而不是 `~/.config/omf/config.fish`,因为这可以让你保持在版本控制整个 `$OMF_CONFIG` 目录。
|
它强烈建议您自定义的启动命令写入入 `init.fish` 文件而不是 `~/.config/omf/config.fish`,因为这可以让你保持在版本控制整个 `$OMF_CONFIG` 目录。
|
||||||
|
|
||||||
如果你需要的Starup命令来运行*之前*噢,我的鱼开始加载插件,将它们放置在 `before.init.fish` 代替。如果你不确定,通常最好把东西 `init.fish` 。
|
如果你需要的命令要在Oh My Fish开始加载插件之前执行,将它们放置在 `before.init.fish`。如果你不确定,通常最好把东西放在 `init.fish` 里面。
|
||||||
|
|
||||||
### 关于 bundle
|
### 关于 bundle
|
||||||
|
|
||||||
@ -110,7 +111,7 @@ Oh My Fish 安装脚本会把自身启动代码加载到 fish 的配置文件 (`
|
|||||||
|
|
||||||
## 创建插件
|
## 创建插件
|
||||||
|
|
||||||
Oh My Fish 使用了友好的插件架构能够简化插件的开发,其中包括初始化、卸载事件和函数的自动加载。[查看相关文档](Packages.md) 获取更多信息。
|
Oh My Fish 使用了友好的插件架构,能够简化插件的开发,其中包括初始化、卸载事件和函数的自动加载。[查看相关文档](Packages.md) 获取更多信息。
|
||||||
|
|
||||||
[fishshell]: http://fishshell.com
|
[fishshell]: http://fishshell.com
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<img src="https://cdn.rawgit.com/oh-my-fish/oh-my-fish/e4f1c2e0219a17e2c748b824004c8d0b38055c16/docs/logo.svg" align="left" width="128px" height="128px"/>
|
<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
|
# Core Library
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
function git_is_dirty -d "Check if there are changes to tracked files"
|
function git_is_dirty -d "Check if there are changes to tracked files"
|
||||||
git_is_repo; and not command git diff --no-ext-diff --quiet --exit-code
|
git_is_worktree; and not command git diff --no-ext-diff --quiet --exit-code
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
function git_is_repo -d "Check if directory is a repository"
|
function git_is_repo -d "Check if directory is a repository"
|
||||||
test -d .git; or command git rev-parse --git-dir >/dev/null 2> /dev/null
|
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
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
function git_is_touched -d "Check if repo has any changes"
|
function git_is_touched -d "Check if repo has any changes"
|
||||||
git_is_repo; and begin
|
git_is_worktree; and begin
|
||||||
# The first checks for staged changes, the second for unstaged ones.
|
# The first checks for staged changes, the second for unstaged ones.
|
||||||
# We put them in this order because checking staged changes is *fast*.
|
# We put them in this order because checking staged changes is *fast*.
|
||||||
not command git diff-index --cached --quiet HEAD -- >/dev/null 2>&1
|
not command git diff-index --cached --quiet HEAD -- >/dev/null 2>&1
|
||||||
|
4
lib/git/git_is_worktree.fish
Normal file
4
lib/git/git_is_worktree.fish
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
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"
|
function git_untracked -d "Print list of untracked files"
|
||||||
git_is_repo; and begin
|
git_is_worktree; and begin
|
||||||
command git ls-files --other --exclude-standard
|
command git ls-files --other --exclude-standard
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4,7 +4,7 @@ end
|
|||||||
|
|
||||||
function __fish-spec.all_specs_finished -e all_specs_finished -a spec
|
function __fish-spec.all_specs_finished -e all_specs_finished -a spec
|
||||||
set -l __fish_spec_end_time (__fish-spec.current_time)
|
set -l __fish_spec_end_time (__fish-spec.current_time)
|
||||||
set -l diff (math --scale=3 "($__fish_spec_end_time - $__fish_spec_start_time) / 1000")
|
set -l diff (math "($__fish_spec_end_time - $__fish_spec_start_time) * 0.001")
|
||||||
|
|
||||||
echo -en '\n\nFinished in '
|
echo -en '\n\nFinished in '
|
||||||
printf '%g' $diff
|
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 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 -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 search -n "__fish_use_subcommand" -d "Search for a plugin or theme"
|
||||||
complete -c omf -f -a theme -n "__fish_use_subcommand" -d "Install and list themes"
|
complete -c omf -f -a theme -n "__fish_use_subcommand" -d "Activate and list available themes"
|
||||||
complete -c omf -f -a update -n "__fish_use_subcommand" -d "Update Oh My Fish"
|
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"
|
complete -c omf -f -a version -n "__fish_use_subcommand" -d "Display version"
|
||||||
|
@ -17,9 +17,16 @@ function omf.bundle.install
|
|||||||
test -n "$name_or_url"; or continue
|
test -n "$name_or_url"; or continue
|
||||||
|
|
||||||
set name (omf.packages.name $name_or_url)
|
set name (omf.packages.name $name_or_url)
|
||||||
|
|
||||||
if not contains $name $packages
|
if not contains $name $packages
|
||||||
omf.packages.install $name_or_url;
|
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
|
or set error
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -14,8 +14,11 @@ function omf.cli.install
|
|||||||
and require $package
|
and require $package
|
||||||
|
|
||||||
# If package is a theme, set it to active.
|
# If package is a theme, set it to active.
|
||||||
if contains -- $package (omf.packages.list --theme)
|
set -l themes (omf.packages.list --theme)
|
||||||
|
if contains -- $package $themes
|
||||||
omf.theme.set $package
|
omf.theme.set $package
|
||||||
|
else if set -l ind (contains -i -- (omf.packages.name $package) $themes)
|
||||||
|
omf.theme.set $themes[$ind]
|
||||||
end
|
end
|
||||||
|
|
||||||
test $status != 0;
|
test $status != 0;
|
||||||
|
@ -21,7 +21,7 @@ function omf.cli.theme -a name
|
|||||||
end
|
end
|
||||||
case '*'
|
case '*'
|
||||||
echo (omf::err)"Invalid number of arguments"(omf::off) >&2
|
echo (omf::err)"Invalid number of arguments"(omf::off) >&2
|
||||||
echo "Usage: $_ "(omf::em)"$argv[1]"(omf::off)" [<theme name>]" >&2
|
echo "Usage: $_ "(omf::em)"t"(omf::off)"heme [<theme name>]" >&2
|
||||||
return $OMF_INVALID_ARG
|
return $OMF_INVALID_ARG
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
function omf.index.path -d 'Get the path to the local package index'
|
function omf.index.path -d 'Get the path to the local package index'
|
||||||
set -q XDG_CACHE_HOME
|
set -q XDG_CACHE_HOME
|
||||||
and echo "$XDG_CACHE_HOME/omf"
|
and echo (echo $XDG_CACHE_HOME | sed 's:/*$::')"/omf"
|
||||||
or echo "$HOME/.cache/omf"
|
or echo (echo $HOME | sed 's:/*$::')"/.cache/omf"
|
||||||
end
|
end
|
||||||
|
@ -11,13 +11,19 @@ function __omf.packages.install.error.already
|
|||||||
end
|
end
|
||||||
|
|
||||||
function omf.packages.install -a name_or_url
|
function omf.packages.install -a name_or_url
|
||||||
if set -l props (omf.index.stat $name_or_url type repository)
|
if set -l props (omf.index.stat $name_or_url type repository branch)
|
||||||
set package_type $props[1]
|
set package_type $props[1]
|
||||||
set name $name_or_url
|
set name $name_or_url
|
||||||
set url $props[2]
|
set url $props[2]
|
||||||
|
set branch $props[3]
|
||||||
else
|
else
|
||||||
set name (omf.packages.name $name_or_url)
|
set name (omf.packages.name $name_or_url)
|
||||||
set url $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
|
||||||
end
|
end
|
||||||
|
|
||||||
if contains -- $name (omf.packages.list)
|
if contains -- $name (omf.packages.list)
|
||||||
@ -30,14 +36,14 @@ function omf.packages.install -a name_or_url
|
|||||||
set -l install_dir $OMF_PATH/pkg/$name
|
set -l install_dir $OMF_PATH/pkg/$name
|
||||||
|
|
||||||
# Clone the package repository.
|
# Clone the package repository.
|
||||||
if not omf.repo.clone $url $install_dir
|
if not omf.repo.clone $url $branch $install_dir
|
||||||
__omf.packages.install.error "$name"
|
__omf.packages.install.error "$name"
|
||||||
return $OMF_UNKNOWN_ERR
|
return $OMF_UNKNOWN_ERR
|
||||||
end
|
end
|
||||||
|
|
||||||
# If we don't know the package type yet, check if the package is a theme.
|
# If we don't know the package type yet, check if the package is a theme.
|
||||||
if not set -q package_type
|
if not set -q package_type
|
||||||
test -f $install_dir/fish_prompt.fish
|
test -f $install_dir/fish_prompt.fish -o -f $install_dir/functions/fish_prompt.fish
|
||||||
and set package_type theme
|
and set package_type theme
|
||||||
or set package_type plugin
|
or set package_type plugin
|
||||||
end
|
end
|
||||||
|
@ -14,8 +14,8 @@ function omf.packages.list -d 'List installed packages'
|
|||||||
set -e show_plugins
|
set -e show_plugins
|
||||||
end
|
end
|
||||||
|
|
||||||
set -l plugins_paths $OMF_PATH/pkg/*
|
set -l plugins_paths {$OMF_PATH,$OMF_CONFIG}/pkg/*
|
||||||
set -l themes_paths $OMF_PATH/themes/*
|
set -l themes_paths {$OMF_PATH,$OMF_CONFIG}/themes/*
|
||||||
|
|
||||||
if set -q show_plugins
|
if set -q show_plugins
|
||||||
for path in $plugins_paths
|
for path in $plugins_paths
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
function omf.packages.name -a name_or_url
|
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
|
end
|
||||||
|
@ -17,8 +17,11 @@ function omf.packages.remove -a pkg
|
|||||||
|
|
||||||
# Run uninstall hook first.
|
# Run uninstall hook first.
|
||||||
omf.packages.run_hook $path uninstall
|
omf.packages.run_hook $path uninstall
|
||||||
source $path/uninstall.fish 2> /dev/null;
|
if test -f $path/uninstall.fish
|
||||||
and emit uninstall_$pkg
|
source $path/uninstall.fish 2> /dev/null
|
||||||
|
end
|
||||||
|
emit uninstall_$pkg
|
||||||
|
emit {$pkg}_uninstall
|
||||||
|
|
||||||
if command rm -rf $path
|
if command rm -rf $path
|
||||||
omf.bundle.remove "package" $pkg
|
omf.bundle.remove "package" $pkg
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
function omf.packages.update -a name
|
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)
|
if not set target_path (omf.packages.path $name)
|
||||||
echo (omf::err)"Could not find $name."(omf::off) >&2
|
echo (omf::err)"Could not find $name."(omf::off) >&2
|
||||||
return 1
|
return 1
|
||||||
@ -6,7 +13,7 @@ function omf.packages.update -a name
|
|||||||
|
|
||||||
# Only pull packages in version control
|
# Only pull packages in version control
|
||||||
if test -e $target_path/.git
|
if test -e $target_path/.git
|
||||||
omf.repo.pull $target_path
|
omf.repo.pull $target_path "$branch"
|
||||||
switch $status
|
switch $status
|
||||||
case 0
|
case 0
|
||||||
omf.bundle.install $target_path/bundle
|
omf.bundle.install $target_path/bundle
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
function omf.repo.clone -a url path
|
function omf.repo.clone -a url branch path
|
||||||
command git clone --quiet $url $path
|
if test -z "$branch"
|
||||||
|
command git clone --quiet $url $path
|
||||||
|
else
|
||||||
|
command git clone --quiet $url -b $branch $path
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
function omf.repo.pull
|
function omf.repo.pull -a repo_dir branch
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
set -l repo_dir $argv[1]
|
|
||||||
|
|
||||||
function __omf.repo.git -V repo_dir
|
function __omf.repo.git -V repo_dir
|
||||||
command git -C "$repo_dir" $argv
|
command git -C "$repo_dir" $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if test -z "$branch"
|
||||||
|
set branch (__omf.repo.git symbolic-ref -q --short HEAD)
|
||||||
|
end
|
||||||
|
|
||||||
set -l remote origin
|
set -l remote origin
|
||||||
if test (__omf.repo.git config --get remote.upstream.url)
|
if test (__omf.repo.git config --get remote.upstream.url)
|
||||||
set remote upstream
|
set remote upstream
|
||||||
@ -21,12 +17,12 @@ function omf.repo.pull
|
|||||||
set initial_revision (__omf.repo.git rev-parse -q --verify HEAD);
|
set initial_revision (__omf.repo.git rev-parse -q --verify HEAD);
|
||||||
or return 1
|
or return 1
|
||||||
|
|
||||||
# the refspec ensures that '$remote/master' gets updated
|
# the refspec ensures that '$remote/$branch' gets updated
|
||||||
set -l refspec "refs/heads/master:refs/remotes/$remote/master"
|
set -l refspec "refs/heads/$branch:refs/remotes/$remote/$branch"
|
||||||
__omf.repo.git fetch --quiet $remote $refspec;
|
__omf.repo.git fetch --quiet $remote $refspec;
|
||||||
or return 1
|
or return 1
|
||||||
|
|
||||||
if test (__omf.repo.git rev-list --count master...FETCH_HEAD) -eq 0
|
if test (__omf.repo.git rev-list --count "$branch"...FETCH_HEAD) -eq 0
|
||||||
return 2
|
return 2
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -37,8 +33,8 @@ function omf.repo.pull
|
|||||||
and set stashed
|
and set stashed
|
||||||
end
|
end
|
||||||
|
|
||||||
if test "$initial_branch" != master
|
if test "$initial_branch" != "$branch"
|
||||||
__omf.repo.git checkout master --quiet
|
__omf.repo.git checkout "$branch" --quiet
|
||||||
end
|
end
|
||||||
|
|
||||||
if not __omf.repo.git merge --ff-only --quiet FETCH_HEAD
|
if not __omf.repo.git merge --ff-only --quiet FETCH_HEAD
|
||||||
@ -48,7 +44,7 @@ function omf.repo.pull
|
|||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
if test "$initial_branch" != master
|
if test "$initial_branch" != "$branch"
|
||||||
__omf.repo.git checkout $initial_branch --quiet
|
__omf.repo.git checkout $initial_branch --quiet
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
function omf.theme.set -a target_theme
|
function omf.theme.set -a target_theme
|
||||||
if not test -d $OMF_PATH/themes/$target_theme
|
if not test -d $OMF_PATH/themes/$target_theme -o -d $OMF_CONFIG/themes/$target_theme
|
||||||
return $OMF_INVALID_ARG
|
return $OMF_INVALID_ARG
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -5,18 +5,43 @@ function describe_basic_tests
|
|||||||
|
|
||||||
function it_has_a_help_command
|
function it_has_a_help_command
|
||||||
set -l output (omf help)
|
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
|
assert 0 = $status
|
||||||
end
|
end
|
||||||
|
|
||||||
function it_has_a_doctor_command
|
function it_has_a_doctor_command
|
||||||
set -l output (omf doctor)
|
set -l output (omf doctor)
|
||||||
assert 0 = $status
|
assert 0 = $status
|
||||||
|
assert -n (echo $output | grep "Oh My Fish version")
|
||||||
|
assert -n (echo $output | grep "Checking for a sane environment...")
|
||||||
end
|
end
|
||||||
|
|
||||||
function it_install_packages
|
function it_installs_packages
|
||||||
set -l remove_output (omf remove apt 2> /dev/null)
|
set -l remove_output (omf remove apt 2> /dev/null)
|
||||||
set -l install_output (omf install apt)
|
set -l install_output (omf install apt)
|
||||||
|
|
||||||
assert 0 = $status
|
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
|
||||||
end
|
end
|
||||||
|
32
pkg/omf/spec/omf_list_spec.fish
Normal file
32
pkg/omf/spec/omf_list_spec.fish
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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
|
77
pkg/omf/spec/omf_packages_spec.fish
Normal file
77
pkg/omf/spec/omf_packages_spec.fish
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
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
|
26
tools/ci-install-fish.sh
Executable file
26
tools/ci-install-fish.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/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,11 +1,27 @@
|
|||||||
#!/usr/bin/env fish
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
set -l project_dir (status -f|xargs dirname|xargs dirname)
|
# 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
|
||||||
|
|
||||||
if [ $argv ]
|
if [ $argv ]
|
||||||
set theme_doc $argv
|
set packages "$argv/packages"
|
||||||
else
|
else
|
||||||
set theme_doc "$project_dir/docs/Themes.md"
|
set packages "../packages-main/packages"
|
||||||
end
|
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_contents (mktemp /tmp/fish.Themes.Content.XXXXX.md)
|
||||||
set temp_theme_toc (mktemp /tmp/fish.Themes.TOC.XXXXX.md)
|
set temp_theme_toc (mktemp /tmp/fish.Themes.TOC.XXXXX.md)
|
||||||
|
|
||||||
@ -31,19 +47,45 @@ function __find_readme -a raw_content
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
echo "Generating Themes documentation to $theme_doc ..."
|
function __write_toc
|
||||||
echo "# Available themes" > $temp_theme_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
|
||||||
|
|
||||||
for theme in (command find $project_dir/db/themes/ -type f|sort)
|
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
|
||||||
|
|
||||||
|
for theme in $themes
|
||||||
set -l name (basename $theme)
|
set -l name (basename $theme)
|
||||||
read -l url < $theme
|
set -l url (grep repository $theme | string replace "repository = " "")
|
||||||
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 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)
|
set -l readme (__find_readme $raw_content)
|
||||||
|
|
||||||
echo "- [$name](#$name)" >> $temp_theme_toc
|
echo "# [$name]("$url")" >> $temp_theme_contents
|
||||||
echo "# $name" >> $temp_theme_contents
|
|
||||||
if [ $readme ]
|
if [ $readme ]
|
||||||
echo "Fetching readme for $name"
|
echo "Fetching readme for $name" >&2
|
||||||
__write_theme_readme $name $raw_content $readme
|
__write_theme_readme $name $raw_content $readme
|
||||||
else
|
else
|
||||||
echo "FAILED: No readme for $name" >&2
|
echo "FAILED: No readme for $name" >&2
|
||||||
@ -54,8 +96,8 @@ end
|
|||||||
echo "" >> $temp_theme_toc
|
echo "" >> $temp_theme_toc
|
||||||
cat $temp_theme_contents >> $temp_theme_toc
|
cat $temp_theme_contents >> $temp_theme_toc
|
||||||
rm -f $theme_doc
|
rm -f $theme_doc
|
||||||
cat $temp_theme_toc >> $theme_doc
|
cat $temp_theme_toc
|
||||||
echo "All done: $theme_doc"
|
echo "All done!" >&2
|
||||||
|
|
||||||
rm $temp_theme_contents
|
rm $temp_theme_contents
|
||||||
rm $temp_theme_toc
|
rm $temp_theme_toc
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
# 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
|
|
@ -1,16 +0,0 @@
|
|||||||
#!/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
|
|
@ -1,7 +0,0 @@
|
|||||||
#!/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…
Reference in New Issue
Block a user