posh-git | dotfiles | |
---|---|---|
18 | 3 | |
7,419 | 28 | |
- | - | |
0.0 | 7.1 | |
about 2 months ago | about 1 month ago | |
PowerShell | Shell | |
MIT License | Do What The F*ck You Want To Public License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
posh-git
-
PowerShell: The object-oriented shell you didn't know you needed
Ah if you want auto completion for native commands they need to be registered first. PSReadLine provides autocompletion support but it only works by default with things builtin to PowerShell itself. For `git` there is a fairly popular module called posh-git [1] that provides auto completion support for some of the well known commands. Git for Windows also calls it out [2]. You can also provide your own custom auto complete calls with Register-ArgumentCompleter [3]. Hope this helps!
[1] https://github.com/dahlbyk/posh-git
-
The bash book to rule them all
PowerShell: https://github.com/dahlbyk/posh-git/blob/master/src/GitPromp...
I believe this is clean Bash code and clean PowerShell code, and a script with a certain complexity. The functions inside the Bash script are documented using comments, the ones inside the PowerShell script are documented using "structured comments" (similar to javadoc/xmldoc/...). The parameters of the functions inside the PowerShell script also contain metadata which is used to provide completion on the commandline and similar functionality as the command line flags you demonstrated.
I just learned about 'getopts' in Bash, which you can actually also use to implement parameters to a Bash function. So what you are showing on a script level, can also be applied for functions. Did not know about that.
Still, not saying PowerShell is better than Bash in a Linux context, but it seems a lot of Linux users have a gut reaction to right out reject PowerShell. I think it does have some advantages for certain use cases, like more complex scripts, a cross-platform context, ... and of course, for someone with a .NET background it's easier to program more complex things with it.
- Stuck trying to execute a ps1 from my github repo
-
Kitsch-Prompt - golang based cross-platform shell prompt
Starship is pretty slick, but I feel like it's lacking in the customization department. It's easy to get it to display whatever you want, but hard to get it to show it exactly how you want it. If you want a "powerline" style prompt, that's basically impossible in Starship (although it's one of the most upvoted feature requests). Or using color gradients on the prompt - I have this 16.7M color display, why am I limited to flat colors? Finally I'm a big fan of posh git, and Starship doesn't have the ability to display anything like this natively. I used a custom command to run a modified version of posh-git for a long time, but it wasn't very fast.
-
What is the name of the cli tool that shows your current branch and changes you've made?
If you're on Windows, I've used posh-git in the past.
- Repos and PowerShell
- posh-git
- Adding Git autocomplete to PowerShell (Windows)
-
I just discovered aliases and I'm looking for more.
The Posh-Git module for showing Git repo details in the prompt.
-
How to increase productivity at work with a pretty Windows Terminal and smart Powerline tools
Install Posh-Git using this command:
dotfiles
-
The bash book to rule them all
> An interactive shell can be a login-shell or a non-login-shell.
A shell can be login and non-interactive.
This happens e.g when starting a session from a X session manager. Subsequently a terminal such as Xterm starts non-login interactive sessions.
Similarly doing ssh starts a non-interactive login shell.
> However, bash behaves like an interactive non-login shell in this case and reads `bashrc`.
IIRC nope: distros such as Debian often have bashrc source bash profile (or the other way around, I can't recall) which has me irate to no end+. They even have some TTY dependent stuff in profile which spits out some error in some cases when no TTY is allocated because heh not interactive.
+ I took great length to have my rc and profile properly separated because it's that much faster not to source the unneeded stuff. https://github.com/lloeki/dotfiles
-
A Dotfile History
Got a similar repo: https://github.com/lloeki/dotfiles
A couple of differences though.
- there's a setup script to do the basic symlinks, automatically from the files in the "home" subdir by prepending the names with .
- then for shell stuff everything is sourced from either shell, bash, or zsh subdirs, all in modular files
- shell dir content is autoloaded based on +x
- there are polyfills for bash that makes it more zsh-like (stuff like precmd)
- each shell module tests for tool presence and is a noop or sets up a fallback when the tool is not available, so I can clone this on any system and have it still work, gracefully degrading down to zero deps except the shell itself
- it also attempts to provide a uniform experience across bash versions and OSes (darwin, linux)
- prompt is minimal (workdir, dirname only, not the full path), increases with detail progressively and in a hierarchical order (root if root, host if ssh, workdir, vcs branch if in repo, vcs status as symbols if nonempty, venv name if virtualenv, "nix" if in nix shell)
- How to navigate directories faster with Bash (2015)
What are some alternatives?
oh-my-posh - The most customisable and low-latency cross platform/shell prompt renderer
fzf - :cherry_blossom: A command-line fuzzy finder
Git Credential Manager for Windows
nnn - n³ The unorthodox terminal file manager
GitExtensions - Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
goat - POSIX-compliant shell movement boosting hack for real ninjas (aka `cd x` and `cd ...`)
GitLink - Making .NET open source accessible!
bashmarks - Directory bookmarks for the shell
Bonobo Git Server - Bonobo Git Server for Windows is a web application you can install on your IIS and easily manage and connect to your git repositories. Go to homepage for release and more info.
ohmyzsh - 🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
LibGit2Sharp - Git + .NET = ❤
zoxide - A smarter cd command. Supports all major shells.