summaryrefslogtreecommitdiff
path: root/etc/functions/l
diff options
context:
space:
mode:
Diffstat (limited to 'etc/functions/l')
-rw-r--r--etc/functions/l12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/functions/l b/etc/functions/l
new file mode 100644
index 0000000..d461998
--- /dev/null
+++ b/etc/functions/l
@@ -0,0 +1,12 @@
+# self-explaining, I think
+l () {
+ if [[ -f "$1" ]]; then
+ case "$1" in
+ *.bz2) bzless "$1" ;;
+ *.gz) zless "$1" ;;
+ *) less "$1" ;;
+ esac
+ else
+ echo "No such file, dude."
+ fi
+}