Skip to content

Commit

Permalink
Update c function
Browse files Browse the repository at this point in the history
  • Loading branch information
walle committed Feb 24, 2014
1 parent 1cf9726 commit 0fae37b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions bash/functions.sh
@@ -1,16 +1,13 @@
# Jump to code

c() { cd ~/gitrepositories/$1; }
_c() {
local cur
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
local cur=${COMP_WORDS[COMP_CWORD]}

local tags=$(for t in `ls ~/gitrepositories | \
awk '{print $1}'`; do echo ${t}; done)
COMPREPLY=($(compgen -W "${tags}" $cur))
COMPREPLY=($(cd ~/gitrepositories; compgen -o dirnames -S '/' -f -- $cur))
}

complete -o nospace -F _c c

complete -F _c c

# Create a new directory and enter it
Expand Down
2 changes: 1 addition & 1 deletion sublime/User/Package Control.last-run
@@ -1 +1 @@
1393181634
1393266244

0 comments on commit 0fae37b

Please sign in to comment.