Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
4dce175e
Unverified
Commit
4dce175e
authored
Mar 24, 2022
by
Suchandra Thapa
Committed by
GitHub
Mar 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(fzf): support `fzf` installed with MacPorts (#10794)
parent
50113a53
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
fzf.plugin.zsh
plugins/fzf/fzf.plugin.zsh
+27
-0
No files found.
plugins/fzf/fzf.plugin.zsh
View file @
4dce175e
...
@@ -173,6 +173,32 @@ function fzf_setup_using_cygwin() {
...
@@ -173,6 +173,32 @@ function fzf_setup_using_cygwin() {
return
0
return
0
}
}
function
fzf_setup_using_macports
()
{
# If the command is not found, the package isn't installed
((
$+
commands[fzf]
))
||
return
1
# The fzf-zsh-completion package installs the auto-completion in
local
completions
=
"/opt/local/share/zsh/site-functions/fzf"
# The fzf-zsh-completion package installs the key-bindings file in
local
key_bindings
=
"/opt/local/share/fzf/shell/key-bindings.zsh"
if
[[
!
-f
"
$completions
"
||
!
-f
"
$key_bindings
"
]]
;
then
return
1
fi
# Auto-completion
if
[[
-o
interactive
&&
"
$DISABLE_FZF_AUTO_COMPLETION
"
!=
"true"
]]
;
then
source
"
$completions
"
2>/dev/null
fi
# Key bindings
if
[[
"
$DISABLE_FZF_KEY_BINDINGS
"
!=
"true"
]]
;
then
source
"
$key_bindings
"
2>/dev/null
fi
return
0
}
# Indicate to user that fzf installation not found if nothing worked
# Indicate to user that fzf installation not found if nothing worked
function
fzf_setup_error
()
{
function
fzf_setup_error
()
{
cat
>
&2
<<
'
EOF
'
cat
>
&2
<<
'
EOF
'
...
@@ -185,6 +211,7 @@ fzf_setup_using_openbsd \
...
@@ -185,6 +211,7 @@ fzf_setup_using_openbsd \
||
fzf_setup_using_debian
\
||
fzf_setup_using_debian
\
||
fzf_setup_using_opensuse
\
||
fzf_setup_using_opensuse
\
||
fzf_setup_using_cygwin
\
||
fzf_setup_using_cygwin
\
||
fzf_setup_using_macports
\
||
fzf_setup_using_base_dir
\
||
fzf_setup_using_base_dir
\
||
fzf_setup_error
||
fzf_setup_error
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment