-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor fish scripts for fisher (#11)
* Uninstall: Rename file to conf.d/fish_apple_touchbar.fish Follow fisher's recommended filename for file https://github.com/jorgebucaran/fisher/tree/56c629a3a9086f33eeae801598b2046cab9bea6b#event-system. * Move init.fish to conf.d/plugin_name.fish Follow fisher's recommendation jorgebucaran/fisher#651 (comment). * Use long-format options in conf.d/fish_apple_touchbar.fish Docs: https://fishshell.com/docs/current/cmds/status.html https://fishshell.com/docs/current/cmds/set.html https://fishshell.com/docs/current/cmds/functions.html * Move top-level fish functions to functions/ Follow fisher's recommendation jorgebucaran/fisher#651 (comment). * Move functions/keybindings.fish to conf.d/fish_apple_touchbar.fish Quote variables to fix fish linter error about missing argument for --on-event. Follow fisher's recommended filename for file https://github.com/jorgebucaran/fisher/tree/56c629a3a9086f33eeae801598b2046cab9bea6b#event-system. * Changelog: Document changes * Conf.d: Fix install and uninstall events Fixed typo in install function name. Removed curly braces from variables, their values were including these—e.g. fish_apple_touchbar{_install}. * Changelog: Document fixes Disable markdownlint MD036 warning for specific line (exception).
- Loading branch information
1 parent
12f996a
commit acd076e
Showing
6 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Moved contents of init.fish here | ||
# Source: https://github.com/jorgebucaran/fisher/issues/651#issuecomment-762808325 | ||
fish-apple-touchbar | ||
|
||
# Expected value should be fish_apple_touchbar_install | ||
set --local plugin_name_install (basename (status --current-filename) .fish)_install | ||
|
||
# Expected value should be fish_apple_touchbar_uninstall | ||
set --local plugin_name_uninstall (basename (status --current-filename) .fish)_uninstall | ||
|
||
function __fish_apple_touchbar_install --on-event "$plugin_name_install" | ||
__fish_apple_touchbar_first_view | ||
end | ||
|
||
function __fish_apple_touchbar_uninstall --on-event "$plugin_name_uninstall" | ||
__fish_apple_touchbar_reset_bindings | ||
functions --erase (functions --all | command awk '/^__fish_apple_touchbar/') | ||
end |
File renamed without changes.
This file was deleted.
Oops, something went wrong.