summaryrefslogtreecommitdiffstats
path: root/.bashrc
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-05-30 17:06:47 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-05-30 17:06:47 +0200
commit580f68274b1652e1bf6dfa75b042874fa02a1830 (patch)
treeb32ed32ded9b6a995d3755c06127e7fa689e1877 /.bashrc
parentf6cb30edcdcfa63b6cbe8f23e56832126887ea40 (diff)
downloaddotfiles-580f68274b1652e1bf6dfa75b042874fa02a1830.tar.gz
dotfiles-580f68274b1652e1bf6dfa75b042874fa02a1830.tar.xz
dotfiles-580f68274b1652e1bf6dfa75b042874fa02a1830.zip
.bashrc: cdup print the target directory as well, g* use pushd
re: cdup ... it can be used in scripts like "cd $(cdup 4)" (untested) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc6
1 files changed, 3 insertions, 3 deletions
diff --git a/.bashrc b/.bashrc
index 06eee2f..fb9a74f 100644
--- a/.bashrc
+++ b/.bashrc
@@ -17,13 +17,13 @@ PS1='\[\033[01;34m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
alias mc='LESS="-RSX" mc'
-alias gmy="cd ~/wrkspc/gmy"
-alias gwork="cd ~/wrkspc/gwork"
+alias gmy="pushd ~/wrkspc/gmy >/dev/null"
+alias gwork="pushd ~/wrkspc/gwork >/dev/null"
cdup() {
local up="."
for i in $(seq 1 $1); do up+="/.."; done
- cd "${up}" 2>/dev/null || :
+ cd "${up}" 2>/dev/null && pwd || :
unset up
}