aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-08-31 12:59:35 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-08-31 12:59:35 -0300
commitba64be81982f10e5dc6bf8d527b7e29aa5ddb3dd (patch)
treea6b872c74081419bf835ec2ec081b963b69d4599
parent829dfced250fe9628b37a81e89c46b254d82fc5a (diff)
downloadprofile-ba64be81982f10e5dc6bf8d527b7e29aa5ddb3dd.tar.gz
profile-ba64be81982f10e5dc6bf8d527b7e29aa5ddb3dd.tar.bz2
Remove bashisms from .profile
-rw-r--r--profile.dot.link18
-rwxr-xr-xxsessionrc.dot.link4
2 files changed, 10 insertions, 12 deletions
diff --git a/profile.dot.link b/profile.dot.link
index 8ca4fdd..4bb131a 100644
--- a/profile.dot.link
+++ b/profile.dot.link
@@ -32,17 +32,15 @@ export PATH=$PATH
export CDPATH=".:~:~/code:~/data:~/file:~/apps:/var/www/data"
# See http://superuser.com/questions/90535/how-do-i-turn-of-auto-echo-in-bash-when-i-cd
-if [ ! -z "$BASH" ]; then
- function cd {
- if [ -z "$*" ]; then
- destination=~
- else
- destination=$*
- fi
+cd() {
+ if [ -z "$*" ]; then
+ destination=~
+ else
+ destination=$*
+ fi
- builtin cd "${destination}" > /dev/null
- }
-fi
+ command cd "${destination}" > /dev/null
+}
# Default editor
#if [ ! -z "$DISPLAY" ]; then
diff --git a/xsessionrc.dot.link b/xsessionrc.dot.link
index fd33ec7..844c86b 100755
--- a/xsessionrc.dot.link
+++ b/xsessionrc.dot.link
@@ -76,11 +76,11 @@ fi
# Clipboard management
# See http://mutelight.org/subtleties-of-the-x-clipboard
-#if which autocutsel &> /dev/null; then
+#if which autocutsel > /dev/null 2&>1; then
# autocutsel -fork &
# autocutsel -selection PRIMARY -fork &
#fi
-if which parcellite &> /dev/null; then
+if which parcellite > /dev/null 2&>1; then
parcellite -n &
fi