Skip to content

Commit

Permalink
fixedn ot inclduign file when cmd-clicking a file to edit
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverisaac committed Jan 18, 2022
1 parent 02afe12 commit 6dcc563
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion handle-click
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function handle_click(){
line_number="${2:-}"

itermRegex="^${ITERM2_CMD_DIR%/}/([a-f0-9A-F]+)$"
if [[ ${ITERM2_CMD_ENABLED:-false} == true ]] && [[ "$file" =~ $itermRegex ]]; then
if [[ "$file" =~ $itermRegex ]]; then
cat "$file"
echo
elif [[ -f "$file" ]]; then
Expand All @@ -24,6 +24,7 @@ function handle_click(){
args=( -g "$file:${line_number}" )
fi
fi
args+=( "$file" )
printf "%q " "${args[@]}"
echo
else
Expand Down

0 comments on commit 6dcc563

Please sign in to comment.