diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-11-16 20:03:31 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-11-16 20:03:31 +0100 |
commit | eaba08ca7ab2819a874ccc3d81bc6cb4cccbe379 (patch) | |
tree | e277c803145ae12204ffc4469f3cb2741cdbb8c0 /etc/functions/rtab | |
parent | 9e910dec14c0f8ac3d0cdef4220046c3c570b40c (diff) |
rtab function: Allow configuration via zstyle
Diffstat (limited to 'etc/functions/rtab')
-rw-r--r-- | etc/functions/rtab | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/functions/rtab b/etc/functions/rtab index b543493..ff4245e 100644 --- a/etc/functions/rtab +++ b/etc/functions/rtab @@ -13,6 +13,15 @@ typeset lastfull=0 typeset short=0 typeset tilde=0 +if zstyle -t ':prompt:rtab' fish; then + lastfull=1 + short=1 + tilde=1 +fi +zstyle -t ':prompt:rtab' last && lastfull=1 +zstyle -t ':prompt:rtab' short && short=1 +zstyle -t ':prompt:rtab' tilde && tilde=1 + while [[ $1 == -* ]]; do case $1 in -f|--fish) @@ -26,6 +35,8 @@ while [[ $1 == -* ]]; do print ' -l, --last Print the last directory''s full name' print ' -s, --short Truncate directory names to the first character' print ' -t, --tilde Print ~ for the home directory' + print 'The long options can also bu set via zstyle, like' + print ' zstyle :prompt:rtab fish yes' return 0 ;; -l|--last) lastfull=1 ;; |