diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-11-16 01:34:16 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-11-16 03:18:44 -0500 |
commit | e42c989d6def401dd893a73cef5d5deac8b42778 (patch) | |
tree | a85a03c0c2c9861729ff182d471ddfb25a09ec33 /config/sh/functions | |
parent | c08a8241a1844216bd76ecfe6bb7d20a8edaf00a (diff) | |
download | conf-e42c989d6def401dd893a73cef5d5deac8b42778.tar.gz conf-e42c989d6def401dd893a73cef5d5deac8b42778.zip |
prefer xdg basedir specification directories
Diffstat (limited to 'config/sh/functions')
-rw-r--r-- | config/sh/functions | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config/sh/functions b/config/sh/functions new file mode 100644 index 0000000..d6068e0 --- /dev/null +++ b/config/sh/functions @@ -0,0 +1,20 @@ +function perldoc { + # XXX bash specific + if type cpandoc > /dev/null 2>&1; then + cpandoc "$@" + else + command perldoc "$@" + fi +} + +function cdu { + local root + root="$(git rev-parse --show-superproject-working-tree 2>/dev/null)" + if [ -n "$root" ]; then + cd "$root" + else + cd "$(git rev-parse --show-toplevel)" + fi +} + +# vim:ft=sh: |