summaryrefslogtreecommitdiff
path: root/.wmii-hg/fixes.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-10-12 14:48:21 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-10-12 14:48:21 -0400
commit9d689e7d224b5c1ea3ab3018998135979f19c5a9 (patch)
tree3778e974ec6826c253e73642f64d8cb030f135df /.wmii-hg/fixes.sh
parent0e2d2d798ff057e6efa9b1a7a918c06aa18a1345 (diff)
add .wmii-hg
Diffstat (limited to '.wmii-hg/fixes.sh')
-rw-r--r--.wmii-hg/fixes.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/.wmii-hg/fixes.sh b/.wmii-hg/fixes.sh
new file mode 100644
index 0000000..aa09157
--- /dev/null
+++ b/.wmii-hg/fixes.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+# Fix various deficiencies in either the shell or the filesystem
+
+##
+# Usage: ls DIRECTORY
+# Linux's 9p kernel module sometimes omits entries in directory listings
+##
+unalias ls &>/dev/null
+ls() {
+ real_ls="`which ls` -1F"
+ [ $# = 0 ] && set -- "`pwd`"
+ f="${1/#${WMII_DIR}/}"
+ if [ "$f" = "$1" ]; then
+ $real_ls "$f"
+ else
+ wmiir ls "$f"
+ fi
+}
+
+##
+# Usage: setsid cmd [arguments...]
+# I like wmiir's setsid better than linux-utils'
+##
+setsid() { wmiir setsid "$@"; }