Comments (23)
+1
from git-radar.
+1
from git-radar.
Awesome, thanks for the suggestion. As I work mostly on mac when I release something that's usually my first port of call. Sorry about that.
Would this assume that the PS1 set in the .git-radar.bashrc
file you propose would augment the existing PS1? Something like:
export PS1="$PS1$(render-radar)"
Just trying to think through how this hangs together. It's definitely something I'm interested in doing, especially since I'm switching soon off Mac (sore wrists from the crappy keyboards).
from git-radar.
👍
from git-radar.
+1
from git-radar.
👍 Wish there was a fast and easy way to install in Linux to.
from git-radar.
+1, not least of all to get this working on Bash in MinGW on Windows.
from git-radar.
+1
from git-radar.
👍 for easy install on Linux. (Particularly for zsh)
from git-radar.
👍
from git-radar.
+1
from git-radar.
+1
Interesting project, but yeah, I ain't going to mess with my existing git setup without explicit directions on installing on Linux. Suggested instructions for Linux could act as a guide.
from git-radar.
What I was able to is clone this repo, add the git-radar executable to a bin (some directory like /bin or something you have added to your path), and add that export command that is in the readme of this repo to my bashrc and that seems to have made it work on ubuntu.
As per issue #16 I did need to make that quick fix given by dbrown, but we should not need that soon as it seems that issue should be resolved once the pull request is merged.
from git-radar.
Great to see you're working on this, I'd love to give git-radar a try on Linux.
from git-radar.
@michaeldfallen No I would propose the .git-radar.bashrc
replace the existing PS1
entirely. If someone installs your script, they've given you permission to replace their bash prompt. If they want their own prefix, they can add it in their own .bashrc
after your script is sourced. Also embedding the override in the file itself also makes it easier for people to upgrade.
from git-radar.
@jart I wouldn't be so sure. Someone may have committed to the git-radar prompt for git-controlled directories, but what if you want to include something similar for bzr-controlled directories, for instance? IMHO users should be able to add the git-radar output to the prompt the way he/she wants to.
from git-radar.
@marcvangend Then they would just say in their .bashrc
:
source ~/.git-radar.bashrc
PS1="rofl bzr $PS1"
from git-radar.
Have you guys realized that parts of git-radar doesn't pass existing tests under Linux? The first priority should be getting the tests to pass on a GNU userland. As of right now, the code uses BSD touch and stat options that probably break the auto-fetching capability (and makes some wrong assumptions about padding).
@jart 👎 to overriding PS1. I'm trying to picture how this would work in oh-my-zsh:
source ~/.git-radar.zshrc
git_radar_prompt=$PROMPT
source $ZSH/oh-my-zsh.sh
export PROMPT="$PROMPT$git_radar_prompt"
As opposed to:
source ~/.git-radar.sh
source $ZSH/oh-my-zsh.sh
export PROMPT="$PROMPT$(git-radar --zsh --fetch)"
where git-radar
is now a shell function and .git-radar.sh
is a generated file that works in zsh or bash (although the option to the function would still control what control characters are outputted)
or a simple:
source $ZSH/oh-my-zsh.sh
export PROMPT="$PROMPT$(git-radar --zsh --fetch)"
where git-radar
is just a self-contained program from cat
-ing the existing git-radar
and radar-base.sh
files, with prompt.*
turned into shell functions in radar-base.sh
And what is the motivation for the sed
line in your example instructions? It'll give anyone who already has source ~/.git-radar.bashrc
in their ~/.bashrc
an error on shell startup.
from git-radar.
Is there any official instruction to install on Linux? I couldn't manage to do it, I'm a shame to my father...
from git-radar.
@mtyurt There are no "official" instructions. But I just symlinked the git-radar executable into /usr/local/bin
and added the export PS1...
line into my .bashrc
from git-radar.
+1 to make simple linux install instructions
from git-radar.
👍
from git-radar.
Solved by #51
from git-radar.
Related Issues (20)
- is_cwd_a_dot_git_directory:1: = not found HOT 7
- Promote new Maintainers HOT 4
- Calling Formula.sha1 is deprecated! HOT 4
- Calling Formula.sha1 is deprecated! HOT 2
- Not upstream indicator taking up too much space HOT 12
- problem with fish HOT 2
- Weird issue with Makefile HOT 2
- Running git-radar --bash is slow HOT 3
- Fish - LS is completely bugged HOT 2
- command overlaps prompt with stash HOT 1
- odd sed error on branches named with multiple / characters HOT 7
- have to pull twice to update a work branch HOT 22
- Made a new lightweight stable version of git-radar HOT 2
- weird characters show up with git-radar on mac os x HOT 8
- fatal error messages with git-radar on local untracked branches HOT 11
- Unhandled git error when a tracked upstream branch is removed HOT 2
- 0.6 upgrade issue HOT 3
- feature req: color prompt red when folder not writable HOT 1
- Reduce the number of binaries needed to be added to the path HOT 3
- cd .git/ produces fatal: /usr/lib/git-core/git-stash cannot be used without a working tree HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-radar.