summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/common.nix b/lib/common.nix
index 4fa34a3..bb89efa 100644
--- a/lib/common.nix
+++ b/lib/common.nix
@@ -134,7 +134,15 @@ in
function cd() {
builtin cd "$@" && ls
}
-
+ function up() {
+ N=$1
+ P=$PWD
+ for (( i=1; i<=$N; i++ ))
+ do
+ P+="/.."
+ done
+ cd "$P"
+ }
# my prompt, after much chagrin
export PS1="\n\[\e[34m\][\u@\h:\w]\[\e[m\] \$(date +%Y.%m.%d..%H.%M) \$(if [ \$? == 0 ]; then true; else echo \(\$?\); fi) \n$ "
'';