a dotfile but it's really big
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

helix: copy commit id instead of branch

karitham 7f33aad2 fec82fa5

+1 -1
+1 -1
modules/dev/editor/helix.nix
··· 61 61 let line_end = (if ("%{selection_line_end}" | is-not-empty) {$"-L%{selection_line_end}"} else "") 62 62 let root = (${pkgs.jujutsu}/bin/jj workspace root | str trim) 63 63 let rel_path = ("%{file_path_absolute}" | path relative-to $root) 64 - let ref = (${pkgs.jujutsu}/bin/jj log -r `heads(::@ & bookmarks())` -T `remote_bookmarks` | parse -r `(?<branch>[^\s]+)@(?<remote>[^\s]+)` | sort-by remote -r | get branch.0) 64 + let ref = (${pkgs.jujutsu}/bin/jj log -r "heads(::@ & bookmarks())" -n 1 --no-graph -T "commit_id") 65 65 let remote_url = (${pkgs.jujutsu}/bin/jj git remote list | parse "{remote} {url}" | where remote == origin | get url.0 | if ($in | str contains '://') {$in} else $"https://($in | str replace ':' '/')" | url parse) 66 66 let url = $"https://($remote_url.host)($remote_url.path | str replace ".git" "")/blob/($ref)/($rel_path)#L($line)($line_end)" 67 67 $url | ${pkgs.wl-clipboard}/bin/wl-copy