From b00860d7c9a7ac258b1a024235c8e9d441134bfd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 19:39:08 +0000 Subject: [PATCH 1/2] Initial plan From aecd11d4566d376d8fcace8fea54c6385bab9263 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 19:46:19 +0000 Subject: [PATCH 2/2] Fix bugs in configuration files - Fix tmux.conf syntax error (removed extra colon before nobold) - Remove duplicate lines in tmux.conf - Remove unreachable return statement in tmux-url-select - Fix shellcheck errors in g2 script (properly quote $@) - Fix shellcheck warnings in install.sh (add quotes and error handling) - Fix shellcheck warnings in forward-ports (add quotes and fix useless cat) Co-authored-by: colinwm <78169714+colinwm@users.noreply.github.com> --- .tmux.conf | 9 +-------- forward-ports | 16 ++++++++-------- g2 | 2 +- install.sh | 20 ++++++++++---------- tmux-url-select | 1 - 5 files changed, 20 insertions(+), 28 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 4af137b..49d955c 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -36,10 +36,6 @@ bind-key -T copy-mode-vi C-j select-pane -D bind-key -T copy-mode-vi C-k select-pane -U bind-key -T copy-mode-vi C-l select-pane -R -set-window-option -g mode-keys vi -bind-key -T copy-mode-vi 'v' send -X begin-selection -bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel - ## COLORSCHEME: gruvbox dark set-option -g status "on" @@ -69,9 +65,6 @@ set-window-option -g window-status-bell-style fg=colour235,bg=colour167 #bg, red # Bind ']' to use pbbaste #bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" -bind-key -T copy-mode-vi 'v' send -X begin-selection -bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel - ## Theme settings mixed with colors (unfortunately, but there is no cleaner way) set-option -g status-justify "left" set-option -g status-left-style "none" @@ -83,5 +76,5 @@ set-window-option -g window-status-separator "" set-option -g status-left "#[fg=colour246, bg=colour254] #S #[fg=colour241, bg=colour255, nobold, noitalics, nounderscore] CODESPACE " set-option -g status-right "#[fg=colour246,bg=colour254] %b %e %l:%M %P #[fg=colour241, bg=colour255, nobold, noitalics, nounderscore] #[fg=colour246,bg=colour254] " -set-window-option -g window-status-current-format "#[fg=colour239, bg=colour31, :nobold, noitalics, nounderscore]#[fg=colour255, bg=colour31] #I#[fg=colour255, bg=colour31, bold] #W #[fg=colour109, bg=colour255, nobold, noitalics, nounderscore] " +set-window-option -g window-status-current-format "#[fg=colour239, bg=colour31, nobold, noitalics, nounderscore]#[fg=colour255, bg=colour31] #I#[fg=colour255, bg=colour31, bold] #W #[fg=colour109, bg=colour255, nobold, noitalics, nounderscore] " set-window-option -g window-status-format "#[fg=colour237,bg=colour239,noitalics]#[fg=colour246,bg=colour254] #I#[fg=colour246, bg=colour254] #W #[fg=colour239, bg=colour255, noitalics] " diff --git a/forward-ports b/forward-ports index b6522eb..75ab5a0 100644 --- a/forward-ports +++ b/forward-ports @@ -1,25 +1,25 @@ #!/bin/bash set -e -trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT +trap 'trap - SIGTERM && kill -- -$$' SIGINT SIGTERM EXIT CODESPACE=$(gh cs list | grep Available | tail -n 1 | cut -f1) # Sync any command history -gh cs -c $CODESPACE cp -e 'remote:$HOME/.zsh_history' /tmp/codespace_zsh_history +gh cs -c "$CODESPACE" cp -e 'remote:$HOME/.zsh_history' /tmp/codespace_zsh_history -touch $HOME/codespace_zsh_history +touch "$HOME/codespace_zsh_history" REMOTE_WC=$(wc -l /tmp/codespace_zsh_history | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | cut -d' ' -f1) -LOCAL_WC=$(wc -l $HOME/codespace_zsh_history | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | cut -d' ' -f1) +LOCAL_WC=$(wc -l "$HOME/codespace_zsh_history" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | cut -d' ' -f1) echo "REMOTE_WC: $REMOTE_WC" echo "LOCAL_WC: $LOCAL_WC" if [ "$REMOTE_WC" -gt "$LOCAL_WC" ]; then echo "Downloaded remote command history" - cp -f /tmp/codespace_zsh_history $HOME/codespace_zsh_history + cp -f /tmp/codespace_zsh_history "$HOME/codespace_zsh_history" else echo "Uploaded command history" - gh cs -c $CODESPACE cp -e $HOME/codespace_zsh_history 'remote:$HOME/.zsh_history' + gh cs -c "$CODESPACE" cp -e "$HOME/codespace_zsh_history" 'remote:$HOME/.zsh_history' fi # To set up the ssh config, put something like this in ~/.ssh/config @@ -41,10 +41,10 @@ fi # go install github.com/lemonade-command/lemonade@latest -cat ~/.ssh/codespaces.template | sed "s/CODESPACENAME/$CODESPACE/g" > ~/.ssh/codespaces +sed "s/CODESPACENAME/$CODESPACE/g" ~/.ssh/codespaces.template > ~/.ssh/codespaces ssh -NT -R 2489:localhost:2489 codespace -o ExitOnForwardFailure=yes & lemonade server & -gh cs -c $CODESPACE ports forward 80:7777 +gh cs -c "$CODESPACE" ports forward 80:7777 diff --git a/g2 b/g2 index 63aabaa..8dccd2b 100755 --- a/g2 +++ b/g2 @@ -1,3 +1,3 @@ #!/bin/bash -G2_INSTALL=/workspaces/g2/bash /workspaces/g2/bash/g2 $@ +G2_INSTALL=/workspaces/g2/bash /workspaces/g2/bash/g2 "$@" diff --git a/install.sh b/install.sh index 6887648..4c250da 100755 --- a/install.sh +++ b/install.sh @@ -1,15 +1,15 @@ #!/bin/bash sudo chsh -s "$(which zsh)" "$(whoami)" -mkdir -p $HOME/bin -cp -rf $(pwd)/.zshrc $HOME/.zshrc -cp -rf $(pwd)/.tmux.conf $HOME/.tmux.conf -cp -rf $(pwd)/.config $HOME -cp -rf $(pwd)/gitconfig $HOME/.gitconfig -cp -rf $(pwd)/.oh-my-zsh $HOME -cp $(pwd)/tmux-url-select $HOME/bin -cp $(pwd)/files $HOME/bin/files -cp -f $(pwd)/g2 $HOME/bin/g2 +mkdir -p "$HOME/bin" +cp -rf "$(pwd)/.zshrc" "$HOME/.zshrc" +cp -rf "$(pwd)/.tmux.conf" "$HOME/.tmux.conf" +cp -rf "$(pwd)/.config" "$HOME" +cp -rf "$(pwd)/gitconfig" "$HOME/.gitconfig" +cp -rf "$(pwd)/.oh-my-zsh" "$HOME" +cp "$(pwd)/tmux-url-select" "$HOME/bin" +cp "$(pwd)/files" "$HOME/bin/files" +cp -f "$(pwd)/g2" "$HOME/bin/g2" git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf ~/.fzf/install --all @@ -37,7 +37,7 @@ sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug. /home/linuxbrew/.linuxbrew/bin/nvim --headless +PlugInstall +qall # Setup CoC further -cd ~/.local/share/nvim/plugged/coc.nvim +cd ~/.local/share/nvim/plugged/coc.nvim || exit npm install yarn ./node_modules/yarn/bin/yarn install diff --git a/tmux-url-select b/tmux-url-select index 01ca5f4..082b855 100755 --- a/tmux-url-select +++ b/tmux-url-select @@ -63,7 +63,6 @@ sub display_highlighted_buffer { if ($i++ == $selection) { $is_first_line = 1 if ($+[0] < $buffer_first_newline_position); return ACTIVE_LINK_HIGHLIGHT."$1\033[0m"; - return; } return NORMAL_LINK_HIGHLIGHT."$1\033[0m" if NORMAL_LINK_HIGHLIGHT; return $1;