-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd9025e
commit 1f3ecc4
Showing
1 changed file
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
import os | ||
|
||
if __name__ == "__main__": | ||
with open("~/.zhistory", 'r') as f: | ||
home = os.path.expanduser("~") | ||
with open(os.path.join(home, ".zhistory"), 'r') as f: | ||
lines = [line for line in f.readlines() if line.startswith("ww ")] | ||
print(lines) | ||
lines = [line.rstrip().lstrip("ww ") for line in lines] | ||
# for line in lines: | ||
# for letter in line: | ||
# # report if letter is not english | ||
# if not letter.isalpha() and not letter.isspace() and not letter == '-': | ||
# print(line) | ||
# break | ||
for line in lines: | ||
os.system(f"charcoal query {line} -s --refresh") |