From 15d08fdd1de8fb7accbccef9c8fa3003f7cab294 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 16 Feb 2009 17:11:04 +0100 Subject: [PATCH 01/16] Improve source_config() debug output. Adding "->" makes results (sourcing, neither exists) stand out clearly in the text and so easy visible. --- shell/env | 6 +++--- tests/source_config.test.out | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/shell/env b/shell/env index c654613..5951153 100644 --- a/shell/env +++ b/shell/env @@ -106,16 +106,16 @@ function source_config() { # If the file does exist then source it. if [ -f $source_file ]; then - source_debug "source_config(): sourcing $source_file" + source_debug "source_config(): -> sourcing $source_file" source $source_file # Otherwise load the .local file if it exists and .local files are # allowed. elif [ -f $source_file_local -a x$5 != xnolocal ]; then - source_debug "source_config(): sourcing $source_file_local" + source_debug "source_config(): -> sourcing $source_file_local" source $source_file_local else - source_debug "source_config(): neither exists" + source_debug "source_config(): -> neither exists" fi } diff --git a/tests/source_config.test.out b/tests/source_config.test.out index 7e1cec7..3f473a6 100644 --- a/tests/source_config.test.out +++ b/tests/source_config.test.out @@ -5,23 +5,23 @@ loaded shell/env.zucker source_config(): checking if tmp/zsh/os/rc.Darwin exists source_config(): checking if tmp/zsh/rc.local exists -source_config(): sourcing tmp/zsh/os/rc.Darwin +source_config(): -> sourcing tmp/zsh/os/rc.Darwin loaded zsh/os/rc.Darwin source_config(): checking if tmp/zsh/host/rc.zucker exists source_config(): checking if tmp/zsh/rc.local exists -source_config(): sourcing tmp/zsh/host/rc.zucker +source_config(): -> sourcing tmp/zsh/host/rc.zucker loaded zsh/host/rc.zucker source_config(): checking if tmp/zsh/os/env.Darwin exists source_config(): checking if tmp/zsh/env.local exists -source_config(): neither exists +source_config(): -> neither exists source_config(): checking if tmp/zsh/host/env.zucker exists source_config(): checking if tmp/zsh/env.local exists -source_config(): sourcing tmp/zsh/env.local +source_config(): -> sourcing tmp/zsh/env.local loaded zsh.env.local source_config(): checking if tmp/bash/host/rc.zucker exists source_config(): checking if tmp/bash/rc.local exists -source_config(): neither exists +source_config(): -> neither exists source_config(): checking if tmp/shell//env.zucker exists source_config(): checking if tmp/shell/env.local exists -source_config(): sourcing tmp/shell//env.zucker +source_config(): -> sourcing tmp/shell//env.zucker loaded shell/env.zucker -- 2.44.2 From fd2658113a6239562893feee9d56affafd559bf8 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 16 Feb 2009 17:42:08 +0100 Subject: [PATCH 02/16] Don't use *.local files, use hostname instead. This allows the use of the configuration files on every system without changes. --- shell/{env.local => env.rammstein} | 0 zsh/{env.local => host/env.rammstein} | 0 zsh/{rc.local => host/rc.rammstein} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename shell/{env.local => env.rammstein} (100%) rename zsh/{env.local => host/env.rammstein} (100%) rename zsh/{rc.local => host/rc.rammstein} (100%) diff --git a/shell/env.local b/shell/env.rammstein similarity index 100% rename from shell/env.local rename to shell/env.rammstein diff --git a/zsh/env.local b/zsh/host/env.rammstein similarity index 100% rename from zsh/env.local rename to zsh/host/env.rammstein diff --git a/zsh/rc.local b/zsh/host/rc.rammstein similarity index 100% rename from zsh/rc.local rename to zsh/host/rc.rammstein -- 2.44.2 From 343e9a806466f525f13cad151a7987d2dc872e5d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 16 Feb 2009 19:27:57 +0100 Subject: [PATCH 03/16] Add bash login and logout configuration files. --- bash/logout | 8 ++++++++ bash/profile | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 bash/logout create mode 100644 bash/profile diff --git a/bash/logout b/bash/logout new file mode 100644 index 0000000..91f4964 --- /dev/null +++ b/bash/logout @@ -0,0 +1,8 @@ +# Bash logout configuration file. + + +# When leaving the console clear the screen to increase privacy. Taken from +# Debian default bash files. Thanks. +if [ "$SHLVL" = 1 ]; then + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q +fi diff --git a/bash/profile b/bash/profile new file mode 100644 index 0000000..3c62d60 --- /dev/null +++ b/bash/profile @@ -0,0 +1,5 @@ +# Bash login configuration file. + + +# Load ~/.bashrc. +. ~/.bashrc -- 2.44.2 From d2063589ae52ca6cda65604b12a91080c7ce3e5f Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 16 Feb 2009 19:32:36 +0100 Subject: [PATCH 04/16] Add zsh logout configuration file. --- zsh/logout | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 zsh/logout diff --git a/zsh/logout b/zsh/logout new file mode 100644 index 0000000..e8bb4f1 --- /dev/null +++ b/zsh/logout @@ -0,0 +1,8 @@ +# Zsh configuration file loaded when zsh exits. + + +# When leaving the console clear the screen to increase privacy. Taken from +# Debian default bash files. Thanks. +if [ "$SHLVL" = 1 ]; then + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q +fi -- 2.44.2 From c632ae1a73c9115923996887995aa7f025a19c6f Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 16 Feb 2009 19:37:34 +0100 Subject: [PATCH 05/16] Add setup support. The Makefile contains a setup target which generates files and creates all necessary symbolic links in ~/. --- Makefile | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8f0c21b..b5643e2 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,25 @@ -# Makefile for shell configuration files. At the moment only used for running -# tests. +# Makefile for shell configuration files. +# Generate necessary files and create symbolic links in ~/. +LINK=../link.sh +.PHONY: setup +setup: + # Generate ~/.less with lesskey. + lesskey lesskey + # Link setup for shells. + $(LINK) shell ~/.shell + $(LINK) bash ~/.bash + $(LINK) bash/rc ~/.bashrc + $(LINK) bash/profile ~/.bash_profile + $(LINK) zsh ~/.zsh + $(LINK) zsh/env ~/.zshenv + $(LINK) zsh/rc ~/.zshrc + $(LINK) zsh/logout ~/.zlogout + # Link setup for additional files. + $(LINK) colordiffrc ~/.colordiffrc + $(LINK) inputrc ~/.inputrc + $(LINK) screenrc ~/.screenrc + test: cd tests; zsh run.zsh - -# Generate files which are just provided here as template. -generate: - lesskey lesskey -- 2.44.2 From 73b053fc1efce2c29c602352dd22f74ce1b330b4 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 18 Feb 2009 18:37:15 +0100 Subject: [PATCH 06/16] Use setup.sh instead of Makefile for setup process. It is much easier to extend in the future. --- Makefile | 20 -------------------- setup.sh | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 20 deletions(-) create mode 100755 setup.sh diff --git a/Makefile b/Makefile index b5643e2..f40faad 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,5 @@ # Makefile for shell configuration files. -# Generate necessary files and create symbolic links in ~/. -LINK=../link.sh -.PHONY: setup -setup: - # Generate ~/.less with lesskey. - lesskey lesskey - # Link setup for shells. - $(LINK) shell ~/.shell - $(LINK) bash ~/.bash - $(LINK) bash/rc ~/.bashrc - $(LINK) bash/profile ~/.bash_profile - $(LINK) zsh ~/.zsh - $(LINK) zsh/env ~/.zshenv - $(LINK) zsh/rc ~/.zshrc - $(LINK) zsh/logout ~/.zlogout - # Link setup for additional files. - $(LINK) colordiffrc ~/.colordiffrc - $(LINK) inputrc ~/.inputrc - $(LINK) screenrc ~/.screenrc - test: cd tests; zsh run.zsh diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..d776422 --- /dev/null +++ b/setup.sh @@ -0,0 +1,22 @@ +# Setup script for shell configuration files. + + +. ../lib.sh + +# Generate ~/.less with lesskey. +lesskey lesskey + +# Link setup for shells. +link shell ~/.shell +link bash ~/.bash +link bash/rc ~/.bashrc +link bash/profile ~/.bash_profile +link zsh ~/.zsh +link zsh/env ~/.zshenv +link zsh/rc ~/.zshrc +link zsh/logout ~/.zlogout + +# Link setup for additional files. +link colordiffrc ~/.colordiffrc +link inputrc ~/.inputrc +link screenrc ~/.screenrc -- 2.44.2 From 06cf7183301c514ee26a300dae6b021416d770b0 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 20 Feb 2009 18:37:35 +0100 Subject: [PATCH 07/16] Only load ~/.bashrc if it's available. Also add Vim modeline. --- bash/profile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bash/profile b/bash/profile index 3c62d60..4c25552 100644 --- a/bash/profile +++ b/bash/profile @@ -1,5 +1,9 @@ # Bash login configuration file. -# Load ~/.bashrc. -. ~/.bashrc +# Load ~/.bashrc if it exists. +if [[ -f ~/.bashrc ]]; then + . ~/.bashrc +fi + +# vim: ft=sh -- 2.44.2 From ba926cda844bdd42b39d50fb926068f7a3dc4018 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 20 Feb 2009 21:04:25 +0100 Subject: [PATCH 08/16] Use . instead of source to load config files. This prevents a possible security problem with source, as it also searches the current directory. --- bash/rc | 2 +- shell/env | 4 ++-- zsh/env | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bash/rc b/bash/rc index 942ac8d..d03d05e 100644 --- a/bash/rc +++ b/bash/rc @@ -6,7 +6,7 @@ host=$(echo $(hostname) | sed -e 's/\..*$//') # Load environmental related settings used by all shells. if [ -f ~/.shell/env ]; then - source ~/.shell/env + . ~/.shell/env # Fallback functions as ~/.shell/env couldn't be loaded. else function source_debug() { diff --git a/shell/env b/shell/env index 5951153..9a31ff3 100644 --- a/shell/env +++ b/shell/env @@ -107,13 +107,13 @@ function source_config() { # If the file does exist then source it. if [ -f $source_file ]; then source_debug "source_config(): -> sourcing $source_file" - source $source_file + . $source_file # Otherwise load the .local file if it exists and .local files are # allowed. elif [ -f $source_file_local -a x$5 != xnolocal ]; then source_debug "source_config(): -> sourcing $source_file_local" - source $source_file_local + . $source_file_local else source_debug "source_config(): -> neither exists" fi diff --git a/zsh/env b/zsh/env index 365c01b..a413b57 100644 --- a/zsh/env +++ b/zsh/env @@ -6,7 +6,7 @@ host=${$(hostname)//.*/} # Load environmental related settings used by all shells. if [[ -f ~/.shell/env ]]; then - source ~/.shell/env + . ~/.shell/env # Fallback functions as ~/.shell/env couldn't be loaded. else function source_debug() { -- 2.44.2 From 84e7c74f32f34df344c5a79f149851d0d3c6baf2 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 20 Feb 2009 21:46:36 +0100 Subject: [PATCH 09/16] Forgot to replace one source in tests/. --- tests/source_config.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/source_config.test b/tests/source_config.test index 7d062cf..b623150 100644 --- a/tests/source_config.test +++ b/tests/source_config.test @@ -2,7 +2,7 @@ # Load source_config(). -source ../shell/env +. ../shell/env # Make sure the old temporary directory is removed. -- 2.44.2 From 99b1287d587936dd94b71aa9e65333daa68cc443 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 21 Feb 2009 20:52:59 +0100 Subject: [PATCH 10/16] Test if variables are leaked in source_config(). --- tests/source_config.test | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/source_config.test b/tests/source_config.test index b623150..c8d888e 100644 --- a/tests/source_config.test +++ b/tests/source_config.test @@ -22,14 +22,20 @@ echo echo loaded zsh/os/rc.Darwin > tmp/zsh/os/rc.Darwin function tests() { source_config tmp/zsh os rc Darwin nolocal + echo -n $source_file$source_file_local source_config tmp/zsh host rc zucker + echo -n $source_file$source_file_local source_config tmp/zsh os env Darwin nolocal + echo -n $source_file$source_file_local source_config tmp/zsh host env zucker + echo -n $source_file$source_file_local source_config tmp/bash host rc zucker + echo -n $source_file$source_file_local source_config tmp/shell "" env zucker + echo -n $source_file$source_file_local } # Run tests without and with debug output. -- 2.44.2 From ae1e97b372502603183cb4c4b6cac43966b10e27 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 21 Feb 2009 21:05:44 +0100 Subject: [PATCH 11/16] Don't use local in source_config(). --- shell/env | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shell/env b/shell/env index 9a31ff3..af46c8b 100644 --- a/shell/env +++ b/shell/env @@ -97,8 +97,8 @@ export LSCOLORS # If DEBUG is set to a non empty value additional debug output is printed. function source_config() { # Path to the file to source and its local counterpart. - local source_file=$1/$2/$3.$4 - local source_file_local=$1/$3.local + source_file=$1/$2/$3.$4 + source_file_local=$1/$3.local # Additional debug output. source_debug "source_config(): checking if $source_file exists" @@ -117,6 +117,8 @@ function source_config() { else source_debug "source_config(): -> neither exists" fi + + unset source_file source_file_local } source_debug "finished sourcing ~/.shell/env" -- 2.44.2 From 2f32959d61b28e7bb1d991502bcbeb1301795d1a Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 21 Feb 2009 18:02:19 -0600 Subject: [PATCH 12/16] Be more compatible in shell/env. --- shell/env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/env b/shell/env index 6424c58..a119eaf 100644 --- a/shell/env +++ b/shell/env @@ -5,7 +5,7 @@ # # Doesn't fit perfectly in this file, but this is the best place to make it # available everywhere. -function source_debug() { +function source_debug { if [ x$DEBUG != x ]; then echo $@ fi @@ -101,7 +101,7 @@ export LSCOLORS # available everywhere. # # If DEBUG is set to a non empty value additional debug output is printed. -function source_config() { +function source_config { # Path to the file to source and its local counterpart. if [ x$4 != x ]; then source_file=$1/$2/$3.$4 -- 2.44.2 From 3e0077f06bf1930070a98562a0594e739760179d Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 22 Feb 2009 03:29:56 +0100 Subject: [PATCH 13/16] source_config() can load normal configuration files. No extension (like hostname; $4) have to be used. See source code for more information. Update tests and add Vim modeline. --- shell/env | 16 +++++++++++++++- tests/source_config.test | 8 ++++++++ tests/source_config.test.out | 8 ++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/shell/env b/shell/env index af46c8b..6424c58 100644 --- a/shell/env +++ b/shell/env @@ -65,6 +65,7 @@ export LSCOLORS # in $1. # $3: Base name of file in $2, for example "rc" or "env". # $4: Extension for $3, if this file doesn't exist "$1/$3.local" is sourced. +# Can be empty, then no extension is used. # $5: Additional options, set to nolocal to prevent loading of "$1/$3.local" # if "$1/$2/$3.$4" doesn't exist. # @@ -91,13 +92,24 @@ export LSCOLORS # source_config zsh os env $os nolocal # loads os/rc.Darwin # source_config zsh host env $hostname # loads env.local # +# By letting $4 empty normal configuration files can be sourced. A .local can +# still be used. +# +# source_config zsh "" file # loads zsh/file if it exists +# # Doesn't fit perfectly in this file, but this is the best place to make it # available everywhere. # # If DEBUG is set to a non empty value additional debug output is printed. function source_config() { # Path to the file to source and its local counterpart. - source_file=$1/$2/$3.$4 + if [ x$4 != x ]; then + source_file=$1/$2/$3.$4 + # If $4 is empty don't append a trailing dot. This allows source_config() + # to load normal configuration files. + else + source_file=$1/$2/$3 + fi source_file_local=$1/$3.local # Additional debug output. @@ -122,3 +134,5 @@ function source_config() { } source_debug "finished sourcing ~/.shell/env" + +# vim: ft=sh diff --git a/tests/source_config.test b/tests/source_config.test index c8d888e..7237d11 100644 --- a/tests/source_config.test +++ b/tests/source_config.test @@ -14,6 +14,7 @@ mkdir tmp/shell mkdir tmp/zsh tmp/zsh/host tmp/zsh/os echo echo loaded bash/env.zucker > tmp/shell/env.zucker echo echo loaded shell/env.zucker > tmp/shell/env.zucker +echo echo loaded shell/logout > tmp/shell/logout echo echo loaded zsh.env.local > tmp/zsh/env.local echo echo loaded zsh/rc.local > tmp/zsh/rc.local echo echo loaded zsh/host/rc.zucker > tmp/zsh/host/rc.zucker @@ -36,9 +37,16 @@ function tests() { source_config tmp/shell "" env zucker echo -n $source_file$source_file_local + + source_config tmp/shell "" logout + echo -n $source_file$source_file_local + source_config tmp/shell "" doesnt-exist + echo -n $source_file$source_file_local } # Run tests without and with debug output. tests echo DEBUG=1 tests + +# vim: ft=sh diff --git a/tests/source_config.test.out b/tests/source_config.test.out index 3f473a6..693a4af 100644 --- a/tests/source_config.test.out +++ b/tests/source_config.test.out @@ -2,6 +2,7 @@ loaded zsh/os/rc.Darwin loaded zsh/host/rc.zucker loaded zsh.env.local loaded shell/env.zucker +loaded shell/logout source_config(): checking if tmp/zsh/os/rc.Darwin exists source_config(): checking if tmp/zsh/rc.local exists @@ -25,3 +26,10 @@ source_config(): checking if tmp/shell//env.zucker exists source_config(): checking if tmp/shell/env.local exists source_config(): -> sourcing tmp/shell//env.zucker loaded shell/env.zucker +source_config(): checking if tmp/shell//logout exists +source_config(): checking if tmp/shell/logout.local exists +source_config(): -> sourcing tmp/shell//logout +loaded shell/logout +source_config(): checking if tmp/shell//doesnt-exist exists +source_config(): checking if tmp/shell/doesnt-exist.local exists +source_config(): -> neither exists -- 2.44.2 From a66f040ebf67a9daf18ff7e761de8e306156a783 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 22 Feb 2009 03:39:21 +0100 Subject: [PATCH 14/16] Use one logout file which is included by bash and zsh. Add missing bash logout file to setup.sh and add Vim modeline. --- bash/logout | 15 +++++++++------ setup.sh | 1 + shell/logout | 10 ++++++++++ zsh/logout | 15 +++++++++------ 4 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 shell/logout diff --git a/bash/logout b/bash/logout index 91f4964..af130c6 100644 --- a/bash/logout +++ b/bash/logout @@ -1,8 +1,11 @@ -# Bash logout configuration file. +# Bash logout file. -# When leaving the console clear the screen to increase privacy. Taken from -# Debian default bash files. Thanks. -if [ "$SHLVL" = 1 ]; then - [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q -fi +source_debug "sourcing ~/.bash/logout" + +# Load logout file usable by all shells. +source_config ~/.shell "" logout + +source_debug "finished sourcing ~/.bash/logout" + +# vim: ft=sh diff --git a/setup.sh b/setup.sh index d776422..be74639 100755 --- a/setup.sh +++ b/setup.sh @@ -11,6 +11,7 @@ link shell ~/.shell link bash ~/.bash link bash/rc ~/.bashrc link bash/profile ~/.bash_profile +link bash/logout ~/.bash_logout link zsh ~/.zsh link zsh/env ~/.zshenv link zsh/rc ~/.zshrc diff --git a/shell/logout b/shell/logout new file mode 100644 index 0000000..069603d --- /dev/null +++ b/shell/logout @@ -0,0 +1,10 @@ +# Shell logout file usable by all shells. + + +# When leaving the console clear the screen to increase privacy. Taken from +# Debian default bash files. Thanks. +if [ "$SHLVL" = 1 ]; then + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q +fi + +# vim: ft=sh diff --git a/zsh/logout b/zsh/logout index e8bb4f1..8564cdb 100644 --- a/zsh/logout +++ b/zsh/logout @@ -1,8 +1,11 @@ -# Zsh configuration file loaded when zsh exits. +# Zsh logout file. -# When leaving the console clear the screen to increase privacy. Taken from -# Debian default bash files. Thanks. -if [ "$SHLVL" = 1 ]; then - [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q -fi +source_debug "sourcing ~/.zsh/logout" + +# Load logout file usable by all shells. +source_config ~/.shell "" logout + +source_debug "finished sourcing ~/.zsh/logout" + +# vim: ft=zsh -- 2.44.2 From a6cb81e7d8e1c050de67178532c938c3e5c11ffe Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 22 Feb 2009 15:27:55 +0100 Subject: [PATCH 15/16] Fallback to clear if clear_console is not found in logout. --- shell/logout | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shell/logout b/shell/logout index 069603d..1a87b04 100644 --- a/shell/logout +++ b/shell/logout @@ -2,9 +2,13 @@ # When leaving the console clear the screen to increase privacy. Taken from -# Debian default bash files. Thanks. +# Debian default bash files and modified. Thanks. if [ "$SHLVL" = 1 ]; then - [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q + if [ -x /usr/bin/clear_console ]; then + /usr/bin/clear_console -q + else + clear + fi fi # vim: ft=sh -- 2.44.2 From dd87c200babeaa8006cbe7df050e1477c84a5aba Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 22 Feb 2009 09:59:48 -0600 Subject: [PATCH 16/16] Add Vim modeline. --- bash/host/rc.zucker | 2 ++ bash/rc | 2 ++ shell/env.rammstein | 2 ++ zsh/env | 2 ++ zsh/functions/extract | 2 ++ zsh/host/env.peters-g5 | 2 ++ zsh/host/env.rammstein | 2 ++ zsh/host/env.zucker | 2 ++ zsh/host/rc.rammstein | 2 ++ zsh/host/rc.zucker | 2 ++ zsh/os/rc.Darwin | 2 ++ zsh/rc | 2 ++ 12 files changed, 24 insertions(+) diff --git a/bash/host/rc.zucker b/bash/host/rc.zucker index cd96419..e8e5d11 100644 --- a/bash/host/rc.zucker +++ b/bash/host/rc.zucker @@ -3,3 +3,5 @@ # Immediately start zsh. zsh + +# vim: ft=sh diff --git a/bash/rc b/bash/rc index d03d05e..3e17648 100644 --- a/bash/rc +++ b/bash/rc @@ -36,3 +36,5 @@ set -o vi source_config ~/.bash host rc $host source_debug "finished sourcing ~/.bash/env" + +# vim: ft=sh diff --git a/shell/env.rammstein b/shell/env.rammstein index 488c958..1d9d096 100644 --- a/shell/env.rammstein +++ b/shell/env.rammstein @@ -13,3 +13,5 @@ export http_proxy HTTP_PROXY # Necessary for xterm to find man pages through PATH. unset MANPATH + +# vim: ft=sh diff --git a/zsh/env b/zsh/env index a413b57..ecfd002 100644 --- a/zsh/env +++ b/zsh/env @@ -29,3 +29,5 @@ source_config ~/.zsh os env $(uname) nolocal source_config ~/.zsh host env $host source_debug "finished sourcing ~/.zsh/env" + +# vim: ft=zsh diff --git a/zsh/functions/extract b/zsh/functions/extract index 2fa5304..5a73454 100644 --- a/zsh/functions/extract +++ b/zsh/functions/extract @@ -37,3 +37,5 @@ for i in {1..${#current_dirs}}; do done #compdef '_files -g "*.gz *.tgz *.bz2 *.tbz *.zip *.rar *.tar *.lha"' extract_archive + +# vim: ft=zsh diff --git a/zsh/host/env.peters-g5 b/zsh/host/env.peters-g5 index a008af9..2f7759d 100644 --- a/zsh/host/env.peters-g5 +++ b/zsh/host/env.peters-g5 @@ -4,3 +4,5 @@ # Update the default PATH to include MacPorts, X11, and /usr/local. typeset -U path path=(/opt/local/bin /opt/local/sbin /usr/local/bin $path /usr/X11R6/bin) + +# vim: ft=zsh diff --git a/zsh/host/env.rammstein b/zsh/host/env.rammstein index 91759a7..da59565 100644 --- a/zsh/host/env.rammstein +++ b/zsh/host/env.rammstein @@ -10,3 +10,5 @@ MYUNIX=~/Documents/unix # otherwise the path wouldn't be changed outside the function. typeset -g -U path path=($MYUNIX/bin /opt/local/bin /opt/local/sbin $path /usr/X11R6/bin) + +# vim: ft=zsh diff --git a/zsh/host/env.zucker b/zsh/host/env.zucker index ae383d0..fd00d22 100644 --- a/zsh/host/env.zucker +++ b/zsh/host/env.zucker @@ -5,3 +5,5 @@ # Add my bin/ directory to the default PATH. typeset -U path path=($HOME/bin $path) + +# vim: ft=zsh diff --git a/zsh/host/rc.rammstein b/zsh/host/rc.rammstein index 90c8c58..b5378f8 100644 --- a/zsh/host/rc.rammstein +++ b/zsh/host/rc.rammstein @@ -27,3 +27,5 @@ if [[ $TERM != 'screen' && $TERM != 'dumb' ]]; then clear screen -list fi + +# vim: ft=zsh diff --git a/zsh/host/rc.zucker b/zsh/host/rc.zucker index 61ad339..afbb955 100644 --- a/zsh/host/rc.zucker +++ b/zsh/host/rc.zucker @@ -10,3 +10,5 @@ logs=/var/log/apache2/ruderich # Aliases for easy and fast cd to important directories. alias cdh='cd ~htdocs' alias cdl='cd ~logs' + +# vim: ft=zsh diff --git a/zsh/os/rc.Darwin b/zsh/os/rc.Darwin index 1904e74..992b68c 100644 --- a/zsh/os/rc.Darwin +++ b/zsh/os/rc.Darwin @@ -16,3 +16,5 @@ export CLIPBOARD # Fetch current URL in clipboard with wget. alias wnc='wget --no-proxy $CLIPBOARD' + +# vim: ft=zsh diff --git a/zsh/rc b/zsh/rc index 3c4234b..aa64848 100644 --- a/zsh/rc +++ b/zsh/rc @@ -320,3 +320,5 @@ source_config ~/.zsh os rc $(uname) nolocal source_config ~/.zsh host rc ${$(hostname)//.*/} source_debug "finished sourcing ~/.zsh/rc" + +# vim: ft=zsh -- 2.44.2