#!/usr/bin/guile !# ; displays relative directory references upwards as a path. example: "../..". ; ; can be used with bash like the following to change n directories upwards: ; up() { ; cd $(parent-dir-references $*) ; } ; up 3 (import (sph) (sph list)) (define (parent-dir-references-cli options) (let (n (if (null? options) 1 (string->number (first options)))) (display-line (string-join (make-list n "..") "/")))) (parent-dir-references-cli (tail (program-arguments)))