![]() ![]() Gh pr view is the equivalent of hub browse, with the extra ability of being able to open any pull request in the browser, not just the current branch. Gh pr checkout is the equivalent of hub pr checkout. Gh pr create is the equivalent of hub pull-request. gh fixes that, merging all pull request operations under one pr subcommand: One of the confusing parts of hub is that it has two different subcommands for doing things with pull requests, as highlighted with the hub pull-request and hub pr checkout commands above. hub pr checkout 123 finds the associated remote branch and pulls it down locally. Let’s say you need to run a particular PR, #123, locally as part of reviewing and testing it. Hub pr checkout lets you checkout a specific pull request. hub pull-request -d can be used to create draft pull requests. Hub pull-request lets you create a pull request without having to leave the command line. It’s particularly handy when you want the latest on master for a rebase but don’t want to have to mess around with checking out master, doing the git pull, and then checking out your branch again. Hub sync is like doing a git pull for all of your local branches. I personally prefer viewing diffs in GitHub’s UI, so this is a nice shortcut to pop from the command line over to the browser. Hub browse opens your current branch on GitHub in your default browser. ![]() For example, if you want to find all the TODO comments in your JavaScript files: Test Double agents are split pretty evenly with one vote also for git grep.īoth tools let you specify a pattern to constrain searches. The Silver Searcher came along first, but ripgrep is slightly faster. Ripgrep and The Silver Searcher ( rg and ag respectively on the command-line) were both written as faster replacements for ack, but much, much faster. Next up are the everyday tools, the workhorses of a typical day writing code. Consequently tldr is an indispensable reminder of how to get stuff done. I do not remember things like where I put my wallet, so I’m definitely not going to remember how to tar and gzip a directory. Compare man tar versus its tldr tar counterpart: Where was tldr back when I was in college?!? man pages were so detailed and in-depth that finding command-line help was a definite chore. That said, a simple Brewfile (with backups of course) is a great way to get up and running after disaster and/or a new hardware purchase. Otherwise it works perfectly fine.Some tools, like Brooke Kuhlmann’s macOS or ThoughtBot’s Laptop, expand on the Brewfile to create a rich system for quickly spinning up a new Mac. This is not specific to :Files, but any rg command that returns an exit code of 1. Looks like the only difference here is that if rg is run and returns no results, the exit code is 1, which is expected, and fzf bombs out with a Command failed error. If I move to a directory with files and other directories and run :Files, it works as expected. If I set the FZF_DEFAULT_COMMAND='rg -files -no-ignore-vcs -hidden' for fzf to use rg by default, I now get a "" error and fzf doesn't show anything other than a prompt of the current directory. Now, in neovim, using stock fzf.vim install with no FZF_DEFAULT_COMMAND environment variable set, it works fine when :Files is invoked in an empty directly. If I run "rg -filez" to intentionally invoke a command failure, I get $LastExitCode of 2, as expected. This is not an error, but expected behaviour If I run "rg -files" in an empty directory, the $LastExitCode returns 1, as expected, since rg returned no results. I'm not sure if this is a problem with rg or the way fzf is reacting to rg returning an exit code of 1 (i.e. I have searched through the existing issues.I have read through the manual page of fzf ( man fzf). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |