-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
409 additions
and
64 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
File renamed without changes.
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
File renamed without changes.
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,21 @@ | ||
complete --command nvm --exclusive | ||
complete --command nvm --exclusive --long version --description "Print version" | ||
complete --command nvm --exclusive --long help --description "Print help" | ||
complete --command nvm --long silent --description "Suppress standard output" | ||
|
||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version" | ||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate a version in the current shell" | ||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed versions" | ||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List versions available to install matching optional regex" | ||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active version" | ||
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "( | ||
test -e $nvm_data && string split ' ' <$nvm_data/.index | ||
)" | ||
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')" | ||
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall a version" | ||
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "( | ||
_nvm_list | string split ' ' | string replace system '' | ||
)" | ||
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "( | ||
set --query nvm_default_version && echo default | ||
)" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,28 @@ | ||
function _nvm_install --on-event nvm_install | ||
set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist | ||
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share | ||
set --universal nvm_data $XDG_DATA_HOME/nvm | ||
|
||
test ! -d $nvm_data && command mkdir -p $nvm_data | ||
echo "Downloading the Node distribution index..." 2>/dev/null | ||
_nvm_index_update | ||
end | ||
|
||
function _nvm_update --on-event nvm_update | ||
set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist | ||
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share | ||
set --universal nvm_data $XDG_DATA_HOME/nvm | ||
end | ||
|
||
function _nvm_uninstall --on-event nvm_uninstall | ||
command rm -rf $nvm_data | ||
|
||
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version | ||
|
||
set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source | ||
functions --erase (functions --all | string match --entire --regex -- "^_nvm_") | ||
end | ||
|
||
if status is-interactive && set --query nvm_default_version && ! set --query nvm_current_version | ||
nvm use --silent $nvm_default_version | ||
end |
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
1 change: 1 addition & 0 deletions
1
dot_config/private_fish/fish_plugins → dot_config/fish/fish_plugins
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
jorgebucaran/fisher | ||
patrickf1/fzf.fish | ||
jomik/fish-gruvbox | ||
jorgebucaran/nvm.fish |
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
43 changes: 43 additions & 0 deletions
43
dot_config/fish/functions/_fzf_configure_bindings_help.fish
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,43 @@ | ||
function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings." | ||
echo "\ | ||
USAGE: | ||
fzf_configure_bindings [--COMMAND=[KEY_SEQUENCE]...] | ||
DESCRIPTION | ||
fzf_configure_bindings installs key bindings for fzf.fish's commands and erases any bindings it | ||
previously installed. It installs bindings for both default and insert modes. fzf.fish executes | ||
it without options on fish startup to install the out-of-the-box key bindings. | ||
By default, commands are bound to a mnemonic key sequence, shown below. Each command's binding | ||
can be configured using a namesake corresponding option: | ||
COMMAND | DEFAULT KEY SEQUENCE | CORRESPONDING OPTION | ||
Search Directory | Ctrl+Alt+F (F for file) | --directory | ||
Search Git Log | Ctrl+Alt+L (L for log) | --git_log | ||
Search Git Status | Ctrl+Alt+S (S for status) | --git_status | ||
Search History | Ctrl+R (R for reverse) | --history | ||
Search Processes | Ctrl+Alt+P (P for process) | --processes | ||
Search Variables | Ctrl+V (V for variable) | --variables | ||
Override a command's binding by specifying its corresponding option with the desired key | ||
sequence. Disable a command's binding by specifying its corresponding option with no value. | ||
Because fzf_configure_bindings erases bindings it previously installed, it can be cleanly | ||
executed multiple times. Once the desired fzf_configure_bindings command has been found, add it | ||
to your config.fish in order to persist the customized bindings. | ||
In terms of validation, fzf_configure_bindings fails if passed unknown options. It expects an | ||
equals sign between an option's name and value. However, it does not validate key sequences. | ||
Pass -h or --help to print this help message and exit. | ||
EXAMPLES | ||
Default bindings but bind Search Directory to Ctrl+F and Search Variables to Ctrl+Alt+V | ||
\$ fzf_configure_bindings --directory=\cf --variables=\e\cv | ||
Default bindings but disable Search History | ||
\$ fzf_configure_bindings --history= | ||
An agglomeration of different options | ||
\$ fzf_configure_bindings --git_status=\cg --history=\ch --variables= --processes= | ||
SEE Also | ||
To learn more about fish key bindings, see bind(1) and fish_key_reader(1). | ||
" | ||
end |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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,20 @@ | ||
function _nvm_index_update | ||
test ! -d $nvm_data && command mkdir -p $nvm_data | ||
|
||
set --local index $nvm_data/.index | ||
|
||
if not command curl --location --silent $nvm_mirror/index.tab >$index.temp | ||
command rm -f $index.temp | ||
echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2 | ||
return 1 | ||
end | ||
|
||
command awk -v OFS=\t ' | ||
/v0.9.12/ { exit } # Unsupported | ||
NR > 1 { | ||
print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "") | ||
} | ||
' $index.temp >$index | ||
|
||
command rm -f $index.temp | ||
end |
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,11 @@ | ||
function _nvm_list | ||
set --local versions $nvm_data/* | ||
set --query versions[1] && | ||
string match --entire --regex -- (string match --regex -- "v\d.+" $versions | | ||
string escape --style=regex | | ||
string join "|" | ||
) <$nvm_data/.index | ||
|
||
command --all node | | ||
string match --quiet --invert --regex -- "^$nvm_data" && echo system | ||
end |
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,4 @@ | ||
function _nvm_version_activate --argument-names ver | ||
set --global --export nvm_current_version $ver | ||
set --prepend PATH $nvm_data/$ver/bin | ||
end |
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,5 @@ | ||
function _nvm_version_deactivate --argument-names ver | ||
test "$nvm_current_version" = "$ver" && set --erase nvm_current_version | ||
set --local index (contains --index -- $nvm_data/$ver/bin $PATH) && | ||
set --erase PATH[$index] | ||
end |
File renamed without changes.
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 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
File renamed without changes.
Oops, something went wrong.