diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ac6e1f..a641d5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,38 @@ # Change Log -## [0.8.0][v080] - 2016-02-15 +## [0.8.0][v080] - 2016-02-17 -* Add new **debug** mode enabled by setting a new `$fisher_debug` global / universal variable. For advanced logging and color options, install: [`fish_debug`](https://github.com/fishery/debug). +* Welcome aboard @pickfire, our newest Fisherman organization member*!* + +* Add a new ***debug*** :bug: mode that can be enabled by setting the new `$fisher_debug` global variable. ```fish - fisher install debug + set -g fish_debug # or set -gx fish_debug ``` -This mode makes commands behave verbosely and forces Fisherman to log all kinds of diagnostic information as well as run some simple health checks. + This mode makes commands behave more verbosely and causes Fisherman to log all kinds of diagnostic information. -* Several updates to the [website][http://fisherman.sh]. Changed to using the new SVG logo. More appeal using grammar tweaks. Drop some hardly ever used favicons and switch from SourceCodePro to Monaco style monospace fonts that load faster and cause less pollution. + The default behavior is to log everything. To filter a specific set of logs add one or more keywords to the `fish_debug` variable. -* Renamed core function `wait` to `spin` to reflect usage more accurately and updated its usage across Fisherman accordingly. + ```fish + set -gx fish_debug install uninstall + ``` -* Renamed `$fisher_key_bindings` variable to `$fisher_binds` because it's shorter to type and makes `config.fish` look neater. + The above will cause logs with *only* those keywords to be displayed. In this case, `fisher_install` and `fisher_uninstall` + +* **Rewrite** the Fisherman installer with a new and improved look and added a `TRY_ME` mode in which Fisherman is not installed and the installer explains what will be run in the user's machine. + + ![Installing Fisherman](https://cloud.githubusercontent.com/assets/8317250/13040276/5f0e5350-d3ed-11e5-8994-3488f80c6494.gif) + +* **Rename** core function `wait` to `spin` to reflect usage more accurately and updated its usage across Fisherman accordingly. + +* :warning: **Remove** `scripts` directory in favor of using a `functions` or the root directory for sharing scripts. Using a `scripts` directory does not solve the main problem of sharing scripts with the same name, so this addition was deemed of little value. In the future, a more robust way to avoid name collisions when sharing scripts would be nice to have, but at the moment having a `scripts` directory is not solving this problem but just adding clutter to the configuration. Closes #105. + +* **Update** [website](http://fisherman.sh) to use the new SVG logo. Improve wording. Drop some hardly ever used *.favicons* and switch from `SourceCodePro` to `Monaco` style monospace fonts that will load faster as we don't have to include the font sources. + +* **Rename** `$fisher_key_bindings` variable to `$fisher_binds` because it's shorter to type and makes `config.fish` look neater. + +* **Add** user configuration before sourcing Fisherman configuration. Closes #104. ## [0.7.0][v070] - 2016-02-11 diff --git a/functions/__fisher_plugin_enable.fish b/functions/__fisher_plugin_enable.fish index 0ca9f54..f1c6a8f 100644 --- a/functions/__fisher_plugin_enable.fish +++ b/functions/__fisher_plugin_enable.fish @@ -7,7 +7,7 @@ function __fisher_plugin_enable -a plugin path # While this is true for fish_prompt and fish_right_prompt, a prompt is no # different from other plugins and may optionally include other functions, - # shared scripts, completions, documentation, etc. + # scripts, completions, documentation, etc., which need also be removed. __fisher_plugin_disable "$fisher_prompt" "$fisher_cache/$fisher_prompt" end diff --git a/functions/__fisher_plugin_walk.fish b/functions/__fisher_plugin_walk.fish index cf69d3d..1628e21 100644 --- a/functions/__fisher_plugin_walk.fish +++ b/functions/__fisher_plugin_walk.fish @@ -27,16 +27,10 @@ function __fisher_plugin_walk -a plugin path end end - for prefix in functions scripts "" - for file in $path/$prefix/*.{py,rb,php,pl,awk,sed} - set -l base (basename $file) + for file in $path/{functions/,}*.{py,rb,php,pl,awk,sed} + set -l base (basename $file) - if test -z "$prefix" - set prefix functions - end - - printf "%s %s %s\n" -- $file $prefix/$base - end + printf "%s %s %s\n" -- $file functions/$base end for n in (seq 9) diff --git a/functions/fisher_install.fish b/functions/fisher_install.fish index 1f33816..13c9b21 100644 --- a/functions/fisher_install.fish +++ b/functions/fisher_install.fish @@ -97,7 +97,7 @@ function fisher_install -d "Install Plugins" set index (math $index + 1) end - command mkdir -p $fisher_config/{functions,scripts,completions,conf.d,man} $fisher_cache + command mkdir -p $fisher_config/{functions,completions,conf.d,man} $fisher_cache set -l path $fisher_cache/$name diff --git a/man/man1/fisher-install.1 b/man/man1/fisher-install.1 index 811f6ee..3ccaf84 100644 --- a/man/man1/fisher-install.1 +++ b/man/man1/fisher-install.1 @@ -73,7 +73,7 @@ Shortcuts to other common Git repository hosting services are also available: .IP "" 0 . .P -If a URL is given, the repository is cloned to \fB$fisher_cache\fR the first time and any relevant plugin files are copied to \fB$fisher_config\fR functions, completions, conf\.d, scripts and man directories\. +If a URL is given, the repository is cloned to \fB$fisher_cache\fR the first time and any relevant plugin files are copied to \fB$fisher_config\fR functions, completions, conf\.d and man directories\. . .P If the plugin already exists in \fB$fisher_cache\fR, the files are only copied to \fB$fisher_config\fR\. To update a plugin use \fBfisher update\fR\. diff --git a/man/man1/fisher-install.md b/man/man1/fisher-install.md index d703302..4575f58 100644 --- a/man/man1/fisher-install.md +++ b/man/man1/fisher-install.md @@ -28,7 +28,7 @@ Shortcuts to other common Git repository hosting services are also available: * *gl*/owner/repo `>` https://gitlab.com/owner/repo
* *omf*/owner/repo `>` https://github.com/oh-my-fish/repo
-If a URL is given, the repository is cloned to `$fisher_cache` the first time and any relevant plugin files are copied to `$fisher_config` functions, completions, conf.d, scripts and man directories. +If a URL is given, the repository is cloned to `$fisher_cache` the first time and any relevant plugin files are copied to `$fisher_config` functions, completions, conf.d and man directories. If the plugin already exists in `$fisher_cache`, the files are only copied to `$fisher_config`. To update a plugin use `fisher update`. diff --git a/man/man7/fisher-config.7 b/man/man7/fisher-config.7 index 9320bd1..dd06e03 100644 --- a/man/man7/fisher-config.7 +++ b/man/man7/fisher-config.7 @@ -23,7 +23,7 @@ The home directory\. If you installed Fisherman using the recommended method \fB . .TP \fB$fisher_config\fR -The user configuration directory\. This is default location of your user \fIfishfile\fR, Fisherman \fIkey_bindings\.fish\fR file and the \fIcache\fR, \fIfunctions\fR, \fIcompletions\fR, \fIconf\.d\fR and \fIscripts\fR directories\. \fB$XDG_CONFIG_HOME/fisherman\fR by default\. +The user configuration directory\. This is default location of your user \fIfishfile\fR, Fisherman \fIkey_bindings\.fish\fR file and the \fIcache\fR, \fIfunctions\fR, \fIcompletions\fR and \fIconf\.d\fR directories\. \fB$XDG_CONFIG_HOME/fisherman\fR by default\. . .TP \fB$fisher_file\fR diff --git a/man/man7/fisher-config.md b/man/man7/fisher-config.md index 76d2ed1..2e07b98 100644 --- a/man/man7/fisher-config.md +++ b/man/man7/fisher-config.md @@ -17,7 +17,7 @@ Using the following variables, you can customize the locations of the cache, ind The home directory. If you installed Fisherman using the recommended method `curl -sL install.fisherman.sh | fish`, the location will be `$XDG_DATA_HOME/fisherman`. If you clone Fisherman and run `make` yourself, `$fisher_home` will the current working directory. * `$fisher_config`: - The user configuration directory. This is default location of your user *fishfile*, Fisherman *key_bindings.fish* file and the *cache*, *functions*, *completions*, *conf.d* and *scripts* directories. `$XDG_CONFIG_HOME/fisherman` by default. + The user configuration directory. This is default location of your user *fishfile*, Fisherman *key_bindings.fish* file and the *cache*, *functions*, *completions* and *conf.d* directories. `$XDG_CONFIG_HOME/fisherman` by default. * `$fisher_file`: This file keeps a list of what plugins you have installed and are currently enabled. `$fisher_config/fishfile` by default. See `fisher help fishfile` for details. diff --git a/test/fixtures/path-walk/foobar-path-walk b/test/fixtures/path-walk/foobar-path-walk index 4f312bf..e5358c6 100644 --- a/test/fixtures/path-walk/foobar-path-walk +++ b/test/fixtures/path-walk/foobar-path-walk @@ -20,7 +20,6 @@ -- functions/foobar.pl -- functions/foobar.awk -- functions/foobar.sed --- scripts/norf.py -- functions/quux.awk --man man/man1/foobar.1 --man man/man2/foobar.2 diff --git a/test/install.fish b/test/install.fish index 913d091..7322a92 100644 --- a/test/install.fish +++ b/test/install.fish @@ -23,7 +23,7 @@ test "$TESTNAME - Local paths are installed as symbolic links" -L $path/config/cache/baz end -for file in cache completions conf.d functions man scripts fishfile key_bindings.fish +for file in cache completions conf.d functions man fishfile key_bindings.fish test "$TESTNAME - Add plugin $file to \$fisher_config/$file" -e $path/config/$file end @@ -39,10 +39,6 @@ test "$TESTNAME - Add plugin key bindings to key_bindings.fish" "##foobar## ##foobar##" = (cat $path/config/key_bindings.fish | xargs) end -test "$TESTNAME - Add /scripts/ to scripts directory" - -e $path/config/scripts/norf.py -end - test "$TESTNAME - cache/.index is a copy of the URL in \$fisher_index" (cat $path/config/cache/.index) = (cat $DIRNAME/fixtures/plugins/index) end diff --git a/test/plugin-walk-scripts.fish b/test/plugin-walk-scripts.fish deleted file mode 100644 index 11c929d..0000000 --- a/test/plugin-walk-scripts.fish +++ /dev/null @@ -1,25 +0,0 @@ -set -l path $DIRNAME/.t-$TESTNAME-(random) -set -l extensions py rb php pl awk sed - -function -S setup - mkdir -p $path/{foo/scripts,bar} - - touch $path/foo/scripts/foo.{$extensions} - touch $path/bar/bar.{$extensions} -end - -function -S teardown - rm -rf $path -end - -test "$TESTNAME - Do not source scripts/*.{$extensions} files" - (__fisher_plugin_walk foo $path/foo | awk '{ print $1 }') = -- -end - -test "$TESTNAME - Move /scripts/*.{$extensions} TO scripts/*" - (__fisher_plugin_walk foo $path/foo | awk '{ print $3 }') = scripts/foo.{$extensions} -end - -test "$TESTNAME - Move /*.{$extensions} TO functions/*" - (__fisher_plugin_walk bar $path/bar | awk '{ print $3 }') = functions/bar.{$extensions} -end diff --git a/test/plugin-walk.fish b/test/plugin-walk.fish index c13aca6..0050791 100644 --- a/test/plugin-walk.fish +++ b/test/plugin-walk.fish @@ -20,8 +20,6 @@ # ├── fish_right_prompt.fish Theme/Prompt File * # ├── fish_user_key_bindings.fish Bindings File Fisherman # ├── quux.awk Script File Fisherman OMF -# ├── scripts Script Files Fisherman -# │   └── norf.py # ├── functions Shared Functions * # │   ├── foobar-baz.fish # │   ├── foobar.awk @@ -99,7 +97,6 @@ # -- foobar/... functions/foobar.pl # -- foobar/... functions/foobar.awk # -- foobar/... functions/foobar.sed -# -- foobar/... scripts/norf.py # -- foobar/... functions/quux.awk # --man foobar/... man/man1/foobar.1 # --man foobar/... man/man2/foobar.2 diff --git a/test/uninstall.fish b/test/uninstall.fish index ec3650c..f41c2de 100644 --- a/test/uninstall.fish +++ b/test/uninstall.fish @@ -37,10 +37,6 @@ test "$TESTNAME - Remove plugin key bindings from key_bindings.fish" -z (cat $path/config/key_bindings.fish | xargs) end -test "$TESTNAME - Remove plugin scripts from \$fisher_config/scripts" - ! -e $path/config/scripts/norf.py -end - test "$TESTNAME - Remove plugin \$fisher_config/completions" ! -e $path/config/completions/foobar.fish end