summaryrefslogtreecommitdiff
path: root/.wmii/fixes.sh
blob: 6e1f38bcb11588e0b3d07431ffb9c63f05c9b91d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 2>/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 "$@"; }