Diff
1diff --git a/plugins/per-directory-history/per-directory-history.zsh b/plugins/per-directory-history/per-directory-history.zsh
2index d500090803d142dc8d090f39627e1570419d803d..bdee341bdca98f4958a380457480b59e5ba4a1f0 100644
3--- a/plugins/per-directory-history/per-directory-history.zsh
4+++ b/plugins/per-directory-history/per-directory-history.zsh
5@@ -1,27 +1,27 @@
6 #!/usr/bin/env zsh
7 #
8-# This is a implementation of per directory history for zsh, some
9-# implementations of which exist in bash[1,2]. It also implements
10-# a per-directory-history-toggle-history function to change from using the
11-# directory history to using the global history. In both cases the history is
12-# always saved to both the global history and the directory history, so the
13-# toggle state will not effect the saved histories. Being able to switch
14-# between global and directory histories on the fly is a novel feature as far
15+# This is a implementation of per directory history for zsh, some
16+# implementations of which exist in bash[1,2]. It also implements
17+# a per-directory-history-toggle-history function to change from using the
18+# directory history to using the global history. In both cases the history is
19+# always saved to both the global history and the directory history, so the
20+# toggle state will not effect the saved histories. Being able to switch
21+# between global and directory histories on the fly is a novel feature as far
22 # as I am aware.
23 #
24 #-------------------------------------------------------------------------------
25 # Configuration
26 #-------------------------------------------------------------------------------
27 #
28-# HISTORY_BASE a global variable that defines the base directory in which the
29+# HISTORY_BASE a global variable that defines the base directory in which the
30 # directory histories are stored
31 #
32 #-------------------------------------------------------------------------------
33 # History
34 #-------------------------------------------------------------------------------
35 #
36-# The idea/inspiration for a per directory history is from Stewart MacArthur[1]
37-# and Dieter[2], the implementation idea is from Bart Schaefer on the the zsh
38+# The idea/inspiration for a per directory history is from Stewart MacArthur[1]
39+# and Dieter[2], the implementation idea is from Bart Schaefer on the the zsh
40 # mailing list[3]. The implementation is by Jim Hester in September 2012.
41 #
42 # [1]: http://www.compbiome.com/2010/07/bash-per-directory-bash-history.html
43@@ -32,20 +32,20 @@
44 #
45 # Copyright (c) 2012 Jim Hester
46 #
47-# This software is provided 'as-is', without any express or implied warranty.
48-# In no event will the authors be held liable for any damages arising from the
49+# This software is provided 'as-is', without any express or implied warranty.
50+# In no event will the authors be held liable for any damages arising from the
51 # use of this software.
52 #
53-# Permission is granted to anyone to use this software for any purpose,
54-# including commercial applications, and to alter it and redistribute it
55+# Permission is granted to anyone to use this software for any purpose,
56+# including commercial applications, and to alter it and redistribute it
57 # freely, subject to the following restrictions:
58 #
59-# 1. The origin of this software must not be misrepresented; you must not claim
60-# that you wrote the original software. If you use this software in a product,
61-# an acknowledgment in the product documentation would be appreciated but is
62+# 1. The origin of this software must not be misrepresented; you must not claim
63+# that you wrote the original software. If you use this software in a product,
64+# an acknowledgment in the product documentation would be appreciated but is
65 # not required.
66 #
67-# 2. Altered source versions must be plainly marked as such, and must not be
68+# 2. Altered source versions must be plainly marked as such, and must not be
69 # misrepresented as being the original software.
70 #
71 # 3. This notice may not be removed or altered from any source distribution..
72@@ -99,7 +99,7 @@ function _per-directory-history-change-directory() {
73 local original_histsize=$HISTSIZE
74 HISTSIZE=0
75 HISTSIZE=$original_histsize
76-
77+
78 #read history in new file
79 if [[ -e $_per_directory_history_directory ]]; then
80 fc -R $_per_directory_history_directory
81@@ -108,8 +108,8 @@ function _per-directory-history-change-directory() {
82 }
83
84 function _per-directory-history-addhistory() {
85- print -sr -- ${1%%$'\n'}
86- fc -a -p $_per_directory_history_directory
87+ print -Sr -- ${1%%$'\n'}
88+ fc -p $_per_directory_history_directory
89 }
90
91