GeezerVison is showing github.com — Expand history file path only once · lvgelder/bpython@3afa1db
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: bpython/config.py +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -229,6 +229,8 @@ def get_key_no_doublebind(attr, already_used={}): |
229 | 229 | for key in (struct.pastebin_key, struct.save_key): |
230 | 230 | key_dispatch[key] |
231 | 231 |
|
| 232 | + struct.hist_file = os.path.expanduser(struct.hist_file) |
| 233 | + |
232 | 234 | def load_theme(struct, path, colors, default_colors): |
233 | 235 | theme = ConfigParser() |
234 | 236 | with open(path, 'r') as f: |
|
Collapse file
Copy file name to clipboardExpand all lines: bpython/repl.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -890,7 +890,7 @@ def push(self, s, insert_into_history=True): |
890 | 890 |
|
891 | 891 | def insert_into_history(self, s): |
892 | 892 | if self.config.hist_length: |
893 | | - histfilename = os.path.expanduser(self.config.hist_file) |
| 893 | + histfilename = self.config.hist_file |
894 | 894 | oldhistory = self.rl_history.entries |
895 | 895 | self.rl_history.entries = [] |
896 | 896 | if os.path.exists(histfilename): |
|