]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - shell/aliases
*: License under GPL v3+.
[config/dotfiles.git] / shell / aliases
index f59801bba4c13b650c7f8e91eb50961bc69552fb..98e2931a90f9bd46c0694da5dae60026ceb09231 100644 (file)
@@ -1,6 +1,21 @@
 # Aliases and similar functions which can be used by all shells (supporting
 # them).
 
+# Copyright (C) 2011-2012  Simon Ruderich
+#
+# This file is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file.  If not, see <http://www.gnu.org/licenses/>.
+
 
 # Shortcuts for often used programs.
 alias c=clear
@@ -38,7 +53,7 @@ fi
 # Main ls function, separated to prevent code duplication.
 ls_path=`which ls`
 my_ls() {
-    "$ls_path" -C -F $* 2>&1 | less
+    "$ls_path" -C -F "$@" 2>&1 | less
 }
 # Make sure there is no alias named ls as it causes problems with the
 # following ls function on (at least) bash 4.0.35.
@@ -46,17 +61,17 @@ unalias ls 2> /dev/null
 # GNU ls with colors.
 if [ x$ls_color = xgnu ]; then
     ls() {
-        my_ls --color $*
+        my_ls --color "$@"
     }
 # Normal ls with colors.
 elif [ x$ls_color = xcli ]; then
     ls() {
-        CLICOLOR_FORCE=1 my_ls -G $*
+        CLICOLOR_FORCE=1 my_ls -G "$@"
     }
 # Simple ls with no colors.
 else
     ls() {
-        my_ls $*
+        my_ls "$@"
     }
 fi
 unset ls_color