Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envrcd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
isgphys
envrcd
Commits
47f024d7
Commit
47f024d7
authored
2 months ago
by
Sven Mäder
Browse files
Options
Downloads
Patches
Plain Diff
Load bash-completions from ~/.local/share/bash-completion
parent
99efa4c9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
profile/default/envrcd.d/50-complete
+11
-0
11 additions, 0 deletions
profile/default/envrcd.d/50-complete
profile/rda/envrcd.d/50-complete
+3
-3
3 additions, 3 deletions
profile/rda/envrcd.d/50-complete
with
14 additions
and
3 deletions
profile/default/envrcd.d/50-complete
+
11
−
0
View file @
47f024d7
...
...
@@ -2,3 +2,14 @@
# load system bash-completion
source_if_exists /etc/profile.d/bash_completion.sh
# bash completions for local commands in ~/.local/bin
LOCAL_COMMANDS
=
"fzf tldr zellij uv xh sd delta dust pdu dog hyperfine btm broot lsd eza yazi"
for
LOCAL_COMMAND
in
${
LOCAL_COMMANDS
}
;
do
#if [ -x "$(command -v ${LOCAL_COMMAND})" ]; then # POSIX compatible
if
hash
${
LOCAL_COMMAND
}
2>/dev/null
;
then
# bash builtin
if
[
-x
${
HOME
}
/.local/bin/
${
LOCAL_COMMAND
}
]
;
then
source_if_exists
"
${
HOME
}
/.local/share/bash-completion/
${
LOCAL_COMMAND
}
"
fi
fi
done
This diff is collapsed.
Click to expand it.
profile/rda/envrcd.d/50-complete
+
3
−
3
View file @
47f024d7
...
...
@@ -25,12 +25,12 @@ if [ -f ~/git/gitlab/py-ethz/bin/ethz-completion.bash ] && ! shopt -oq posix; th
fi
# bash completions for local commands in ~/.local/bin
LOCAL_COMMANDS
=
"fzf tldr zellij uv xh sd delta dust pdu dog hyperfine btm broot lsd eza"
LOCAL_COMMANDS
=
"fzf tldr zellij uv xh sd delta dust pdu dog hyperfine btm broot lsd eza
yazi
"
for
LOCAL_COMMAND
in
${
LOCAL_COMMANDS
}
;
do
#if [ -x "$(command -v ${LOCAL_COMMAND})" ]; then # POSIX compatible
if
hash
${
LOCAL_COMMAND
}
2>/dev/null
;
then
# bash builtin
if
[
-x
~
/.local/bin/
${
LOCAL_COMMAND
}
]
;
then
source_if_exists
"
${
ENVRCD_PATH
}
/profile/_assets/
completion
s
/
${
LOCAL_COMMAND
}
_bash
"
if
[
-x
${
HOME
}
/.local/bin/
${
LOCAL_COMMAND
}
]
;
then
source_if_exists
"
${
HOME
}
/.local/share/bash-
completion/
${
LOCAL_COMMAND
}
"
fi
fi
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment