Skip to content

Instantly share code, notes, and snippets.

@mkbabb
Last active January 28, 2025 15:25
Show Gist options
  • Select an option

  • Save mkbabb/0b9a0052ec7fdaac6b07f684eb6ae27d to your computer and use it in GitHub Desktop.

Select an option

Save mkbabb/0b9a0052ec7fdaac6b07f684eb6ae27d to your computer and use it in GitHub Desktop.

Revisions

  1. mkbabb revised this gist Jan 28, 2025. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    ZSH_FRAGMENTS_DIR="$HOME/.zshrc.d"
    export ZSH_FRAGMENTS_DIR="$HOME/.zshrc.d"
    export ZSH="$HOME/.oh-my-zsh"

    mkdir -p $ZSH_FRAGMENTS_DIR

    @@ -14,4 +15,4 @@ fi

    for config_file in $ZSH_FRAGMENTS_DIR/*.zsh; do
    source "$config_file"
    done
    done
  2. mkbabb revised this gist Jun 17, 2024. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -14,4 +14,4 @@ fi

    for config_file in $ZSH_FRAGMENTS_DIR/*.zsh; do
    source "$config_file"
    done
    done
    2 changes: 1 addition & 1 deletion 02-cross-platform.zsh
    Original file line number Diff line number Diff line change
    @@ -35,4 +35,4 @@ zstyle ':autocomplete:*' fzf-completion yes

    znap source zsh-users/zsh-syntax-highlighting
    znap source marlonrichert/zsh-autocomplete
    znap source zsh-users/zsh-autosuggestions
    znap source zsh-users/zsh-autosuggestions
  3. mkbabb revised this gist Jun 17, 2024. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,10 @@ ZSH_FRAGMENTS_DIR="$HOME/.zshrc.d"

    mkdir -p $ZSH_FRAGMENTS_DIR

    GIST_URL="https://gist.github.com/mkbabb/0b9a0052ec7fdaac6b07f684eb6ae27d/raw/7a7c2a19c23d0ac8a7c8631f91cf09c312d606f3"
    CROSS_PLATFORM_FILENAME="02-cross-platform.zsh"
    CROSS_PLATFORM_GIST="https://gist.github.com/mkbabb/0b9a0052ec7fdaac6b07f684eb6ae27d/raw/$CROSS_PLATFORM_FILENAME"

    CROSS_PLATFORM_GIST="$GIST_URL/$CROSS_PLATFORM_FILENAME"

    # Download the cross-platform file only if it doesn't exist
    if [ ! -f $ZSH_FRAGMENTS_DIR/$CROSS_PLATFORM_FILENAME ]; then
    @@ -12,6 +14,4 @@ fi

    for config_file in $ZSH_FRAGMENTS_DIR/*.zsh; do
    source "$config_file"
    done

    source $ZSH/oh-my-zsh.sh
    done
  4. mkbabb revised this gist Jun 17, 2024. 1 changed file with 14 additions and 12 deletions.
    26 changes: 14 additions & 12 deletions 02-cross-platform.zsh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,14 @@ HISTSIZE=10000
    SAVEHIST=10000
    setopt SHARE_HISTORY

    # Theme configuration
    ZSH_THEME="ys"

    # Oh-My-Zsh plugin configuration
    plugins=(
    git
    )

    # Common aliases
    alias zshconfig="mate ~/.zshrc"
    alias ohmyzsh="mate ~/.oh-my-zsh"
    @@ -17,20 +25,14 @@ alias ohmyzsh="mate ~/.oh-my-zsh"

    source ~/Repos/znap/znap.zsh # Start Znap

    zstyle ':autocomplete:*' list-lines 5
    zstyle ':autocomplete:history-search:*' list-lines 5
    zstyle ':autocomplete:history-incremental-search-*:*' list-lines 5
    source $ZSH/oh-my-zsh.sh

    zstyle ':autocomplete:*' list-lines 7
    zstyle ':autocomplete:history-search:*' list-lines 7
    zstyle ':autocomplete:history-incremental-search-*:*' list-lines 7
    zstyle ':autocomplete:*' min-input 1
    zstyle ':autocomplete:*' fzf-completion yes

    znap source zsh-users/zsh-syntax-highlighting
    znap source marlonrichert/zsh-autocomplete
    znap source zsh-users/zsh-autosuggestions

    # Oh-My-Zsh plugin configuration
    plugins=(
    git
    )

    # Theme configuration
    ZSH_THEME="ys"
    znap source zsh-users/zsh-autosuggestions
  5. mkbabb revised this gist Jun 13, 2024. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,8 @@ ZSH_FRAGMENTS_DIR="$HOME/.zshrc.d"

    mkdir -p $ZSH_FRAGMENTS_DIR

    CROSS_PLATFORM_GIST="https://gist.github.com/mkbabb/0b9a0052ec7fdaac6b07f684eb6ae27d/raw"
    CROSS_PLATFORM_FILENAME="02-cross-platform.zsh"
    CROSS_PLATFORM_GIST="https://gist.github.com/mkbabb/0b9a0052ec7fdaac6b07f684eb6ae27d/raw/$CROSS_PLATFORM_FILENAME"

    # Download the cross-platform file only if it doesn't exist
    if [ ! -f $ZSH_FRAGMENTS_DIR/$CROSS_PLATFORM_FILENAME ]; then
    @@ -14,4 +14,4 @@ for config_file in $ZSH_FRAGMENTS_DIR/*.zsh; do
    source "$config_file"
    done

    source $ZSH/oh-my-zsh.sh
    source $ZSH/oh-my-zsh.sh
  6. mkbabb revised this gist Jun 13, 2024. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    ZSH_FRAGMENTS_DIR="$HOME/.zshrc.d"

    mkdir -p $ZSH_FRAGMENTS_DIR

    CROSS_PLATFORM_GIST="https://gist.github.com/mkbabb/0b9a0052ec7fdaac6b07f684eb6ae27d/raw"
    CROSS_PLATFORM_FILENAME="02-cross-platform.zsh"

    # Download the cross-platform file only if it doesn't exist
    if [ ! -f $ZSH_FRAGMENTS_DIR/$CROSS_PLATFORM_FILENAME ]; then
    curl -L $CROSS_PLATFORM_GIST -o $ZSH_FRAGMENTS_DIR/$CROSS_PLATFORM_FILENAME
    fi

    for config_file in $ZSH_FRAGMENTS_DIR/*.zsh; do
    source "$config_file"
    done

    source $ZSH/oh-my-zsh.sh
  7. mkbabb created this gist Jun 13, 2024.
    36 changes: 36 additions & 0 deletions 02-cross-platform.zsh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    # Cross-platform, cross-shell options

    # History settings
    HISTFILE=~/.zsh_history
    HISTSIZE=10000
    SAVEHIST=10000
    setopt SHARE_HISTORY

    # Common aliases
    alias zshconfig="mate ~/.zshrc"
    alias ohmyzsh="mate ~/.oh-my-zsh"

    # Znap configuration
    [[ -r ~/Repos/znap/znap.zsh ]] ||
    git clone --depth 1 -- \
    https://github.com/marlonrichert/zsh-snap.git ~/Repos/znap

    source ~/Repos/znap/znap.zsh # Start Znap

    zstyle ':autocomplete:*' list-lines 5
    zstyle ':autocomplete:history-search:*' list-lines 5
    zstyle ':autocomplete:history-incremental-search-*:*' list-lines 5
    zstyle ':autocomplete:*' min-input 1
    zstyle ':autocomplete:*' fzf-completion yes

    znap source zsh-users/zsh-syntax-highlighting
    znap source marlonrichert/zsh-autocomplete
    znap source zsh-users/zsh-autosuggestions

    # Oh-My-Zsh plugin configuration
    plugins=(
    git
    )

    # Theme configuration
    ZSH_THEME="ys"