Skip to content

Commit 17cc069

Browse files
committed
fix(git-aliases): grt
Nushell has updated its syntax: ```nu grt # => fatal: ambiguous argument 'or': unknown revision or path not in the working tree. # => Use '--' to separate paths from revisions, like this: # => 'git <command> [<revision>...] -- [<file>...]' ```
1 parent a4c2489 commit 17cc069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aliases/git/git-aliases.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export def grset [remote: string, url: string] {
180180
}
181181
export alias grss = git restore --source
182182
export alias grst = git restore --staged
183-
export alias grt = cd (git rev-parse --show-toplevel or echo .)
183+
export alias grt = cd (git rev-parse --show-toplevel | complete | if $in.exit_code == 0 { $in.stdout | str trim } else { '.' })
184184
export alias gru = git reset --
185185
export alias grup = git remote update
186186
export alias grv = git remote --verbose

0 commit comments

Comments
 (0)