Skip to content

Commit 41da225

Browse files
committed
use bash completions v2, added t alias (function) for task
1 parent 1d8b480 commit 41da225

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

bashrc/aliases.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ alias le="less"
2626
alias psg='ps aux | grep'
2727
alias sbrc="source ~/.bashrc"
2828

29+
# Task wrapper function (functions work better with tab completion than aliases)
30+
t() { command task "$@"; }
31+
complete -F _task t
32+
2933
alias grd="~/code/git-remove-debug/git-remove-debug"
3034

3135
which ack-grep > /dev/null 2>&1 || alias ack-grep="ack"

bashrc/bash_completions.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
44
# sources /etc/bash.bashrc).
55
if ! shopt -oq posix; then
6-
if [ -f /etc/bash_completion ]; then
6+
if [ -r /opt/homebrew/etc/profile.d/bash_completion.sh ]; then
7+
source /opt/homebrew/etc/profile.d/bash_completion.sh
8+
elif [ -f /etc/bash_completion ]; then
79
source /etc/bash_completion;
810
elif [ -f /usr/local/etc/bash_completion ]; then
911
source /usr/local/etc/bash_completion;
@@ -22,4 +24,4 @@ fi
2224
# Code jump completion
2325
if [ -f "$DOTFILES_PATH/bash_completions/code_jump.bash" ]; then
2426
source "$DOTFILES_PATH/bash_completions/code_jump.bash"
25-
fi
27+
fi

0 commit comments

Comments
 (0)