Git Product home page Git Product logo

dotfiles's Issues

.dotfiles/.zshrc, LFILE doesn't work

Hello @xcad2k ,

I am raising an issue because I am not sure if I am correct or not, otherwise, I would have raised a PR. Anyway, I got here after watching your youtube video about setting up WSL2 + Windows Terminal + Starship, so, first of all, thank you so much for all the content you put out there, is very useful.

I am trying to setup starship and I am "stealing" your own zsh and starship config to setup my WSL, however, the code in the .zshrc didn't work for me in two WSL distros, the section I am referring is :

# find out which distribution we are running on
LFILE="/etc/*-release"
MFILE="/System/Library/CoreServices/SystemVersion.plist"
if [[ -f $LFILE ]]; then
 _distro=$(awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }')
elif [[ -f $MFILE ]]; then
 _distro="macos"
fi

Setting the LFILE like that for me wasn't working, mainly because .zshrc doesn't have any shebang just runs as regular sh so I was getting the variable LFILE populated literally with the value "/etc/*-release", it still worked, STARSHIP_DISTRO was still being set with the Linux icon but I really wanted the ubuntu

I changed the code to be like this, however, is a very hacky way:

# find out which distribution we are running on
LFILE=$(ls -1 /etc/*-release | head -1)
MFILE="/System/Library/CoreServices/SystemVersion.plist"
if [[ -f $LFILE ]]; then
  _distro=$(awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }')
  echo "I am here LFILE"
elif [[ -f $MFILE ]]; then
  _distro="macos"
  echo "I am here MFILE"
fi

Anyway thank you so much for sharing this with all of us.

Proposal for Zsh

Hey ๐Ÿ‘‹,

This is not an issue. I would like to propose a different Zsh configuration with https://z-shell.pages.dev. If you would like to try it I would prepare a configuration while keeping your current visual/functional state, but when required and additionally it would:

  • Allow the turbo mode that yields 50-80% faster Zsh startup.
  • Easy integration for plugins and libraries compatible with frameworks like Oh My Zsh or Prezto.
  • Create or use dedicated packages that offload the users from providing long and complex commands.
  • Create or use annexes (i.e extensions) โ€” to extend the plugin manager with any new commands or functions.
  • Does not use $FPATH, loading multiple plugins don't clutter $FPATH with the same number of entries (e.g. 10, 15, or more). Code is immune to KSH_ARRAYS and other options typically causing compatibility problems.
  • NEVER require sudo, but provide many workarounds e.g: setting so-called shims locally.

For all mentioned above provides the reports and statistics about:

  • What aliases, functions, bindkeys, Zle widgets, zstyles, completions, variables, $PATH, and $FPATH elements a plugin has set up.
  • Allows to quickly familiarize oneself with a new plugin and provides rich and easy-to-digest information that might be helpful on various occasions.
  • Supports the unloading of plugins and the ability to list, (un)install, and selectively disable, enable plugin's completions.
  • Additional provides functionality to easily create your own plugins (locally/remote).

asciicast

Question about ssh and starship promt

I have a question about ssh and starship.
So i have customized my zsh shell with starship on my wsl2 linux . Now whenever i ssh to a server everything changes. I just get username@hostname: Is this normal? Do i need to customize every server? Or should starship just adjust the promt with the user and hostname of the server?

Not able to see virtual environment for python

Not able to see virtual environment for python getting activated with the current config of starship. I confess that i shamelessly copied your config for starship either because i was lazy and/or because i do not trust my customization skills, But there is no doubt i loved your terminal's look so i went ahead with it. Now obviously, since i have not explored starship documentation i was hoping if someone has already gone through this and fixed it.
After activating the venv for python there is no difference in the console.

Please help me if anyone knows what needs to be done.

[Edit]
Forgot to show screenshots of the current issue -

image

I tried adding the bellow configuration but that too didnt help
[python]
format = '[($virtualenv )]($style)'

starship.toml not formatted with utf-8 powershell error

Not entirely an issue on your side, but maybe a note for future people trying to use this. I was getting an error when using the file on windows terminal(powershell) as it seems it needs to be formatted as ntf-8. I simply opened it up in sublime and saved with encoding as ntf-8. Hopefully helps someone else in the future.

zsh: command not found: exa ?

hello,
thank you for your time and for your awesome tutorial.
i tried your configuration and when i try to use the ls command, i got this error:
image

so in your opinion, how i can solve it?
should i install exa?

where tf is your json theme?

in your yt video you said,
its on your github, in the dotfiles/windows/windowsTerminal/settings.json,
but where tf is this?
ty

Older MacOS .bashrc/starship issue (with fix)

It's probably not mission-critical to you, but I noticed an error on your .bashrc file. You'd probably only notice it on an older Mac as most newer ones default to Zsh as their shell.

Comparing it to your .zsh/.zshrc file shows what's wrong:

.bashrc

โžœ cat .bashrc
# find out which distribution we are running on
LFILE="/etc/*-release"
MFILE="/System/Library/CoreServices/SystemVersion.plist"
_distro=$(awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }')

.zshrc

โžœ cat .zshrc
# find out which distribution we are running on
LFILE="/etc/*-release"
MFILE="/System/Library/CoreServices/SystemVersion.plist"
if [[ -f $LFILE ]]; then
  _distro=$(awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }')
elif [[ -f $MFILE ]]; then
  _distro="macos"
fi

I can attest that the code in your .zshrc file works just fine in .bashrc, though I'm sure you already knew that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.