1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-02 06:19:25 +00:00

Use command_not_found_handler to change to the previous directory

This commit is contained in:
Sorin Ionescu
2014-01-09 23:27:41 -05:00
parent c091f71283
commit 8d9ec24335
3 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,13 @@
#
# Changes the directory to the n previous one.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
if [[ "$1" == [[:digit:]]## ]]; then
builtin cd "+$1"
else
return 127
fi