Skip to content

Commit

Permalink
Remove comments from process substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
gezalore committed Apr 23, 2020
1 parent 82e2e2e commit 6944535
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
11 changes: 4 additions & 7 deletions src/histrefs.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,14 @@ _zsh_prioritize_cwd_history_cwd_hist_entries() {
# Build a grep pattern that will pick out from HISTFILE all
# history entries (that were saved with EXTENDED_HISTORY)
# referenced by the histrefs file
local pattern="$(
# Get last 1000 histrefs
tail -1000 "$histrefs" |
# Prepend "^: " to timestamps
sed -e 's/^/^: /' |
# Join lines with a pipe delimiter
paste -s -d '|' - |
# Format into grep `OR` with backslash pipe
local pattern="$(
tail -1000 "$histrefs" |
sed -e 's/^/^: /' |
paste -s -d '|' - |
sed -e 's/[|]/\\|/g'
)"

Expand Down
11 changes: 4 additions & 7 deletions zsh-prioritize-cwd-history.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,14 @@ _zsh_prioritize_cwd_history_cwd_hist_entries() {
# Build a grep pattern that will pick out from HISTFILE all
# history entries (that were saved with EXTENDED_HISTORY)
# referenced by the histrefs file
local pattern="$(
# Get last 1000 histrefs
tail -1000 "$histrefs" |
# Prepend "^: " to timestamps
sed -e 's/^/^: /' |
# Join lines with a pipe delimiter
paste -s -d '|' - |
# Format into grep `OR` with backslash pipe
local pattern="$(
tail -1000 "$histrefs" |
sed -e 's/^/^: /' |
paste -s -d '|' - |
sed -e 's/[|]/\\|/g'
)"

Expand Down

0 comments on commit 6944535

Please sign in to comment.