summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-09-24 20:38:50 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-09-24 20:38:50 +0200
commitc6efb1a757c04d2bdd069b6c273dd29f072ea850 (patch)
tree76e53b264d768745afa9f29e4b43fce90546c607
parent6e54d7cfd5eb7d3889c13bebef03a71fffe1706c (diff)
downloaddotfiles-c6efb1a757c04d2bdd069b6c273dd29f072ea850.tar.gz
dotfiles-c6efb1a757c04d2bdd069b6c273dd29f072ea850.tar.xz
dotfiles-c6efb1a757c04d2bdd069b6c273dd29f072ea850.zip
Bash config: make diralias also define respective completion
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--.bashrc5
1 files changed, 4 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index 8e3259e..6d05e0c 100644
--- a/.bashrc
+++ b/.bashrc
@@ -8,7 +8,10 @@ _diralias () {
test "${target}" = "$(eval echo "$(dirs +0)")" || pushd "${target}" >/dev/null
pwd
}
-diralias () { alias "$(basename "$1")=_diralias $1"; }
+diralias () {
+ alias "$(basename "$1")=_diralias $1"
+ complete -C "f(){ ls -1 "${1##* }";}; f" "$(basename "$1")"
+}
_linkalias () {
gnome-open "$(printf "$1" "${@:2}")"