Skip to content

Commit

Permalink
fix(nix): /usr/bin/env bash
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Dec 12, 2023
1 parent ddca185 commit 43ddb85
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 20 deletions.
3 changes: 1 addition & 2 deletions modules/bins/bin/cmdai
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash

#!/usr/bin/env bash
mods -m gpt-3.5-turbo "command to $*. only the command, no explanations, no formatting, no surrounding backticks, remove surrounding codeblocks, replace specific directories with placeholders formatted as {{ placeholder }}" |
vipe |
tee -a /dev/tty |
Expand Down
2 changes: 1 addition & 1 deletion modules/bins/bin/code-review
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
git --no-pager diff | mods -f 'perform a code review on this source. \
List out any logical flaws or bugs you find, ranked in order of \
Expand Down
2 changes: 1 addition & 1 deletion modules/bins/bin/ghostty-update
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
cd /tmp
gh release download -R mitchellh/ghostty tip -p 'ghostty-macos-universal.zip' --clobber
Expand Down
2 changes: 1 addition & 1 deletion modules/bins/bin/nix-update-input
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# stolen from https://github.com/meowgorithm/dotfiles/blob/77f8832c37248ce74f143d155110887a21f684ac/modules/home/bash/bashrc#L144
nix flake info --json |
jq -r '.locks.nodes.root.inputs | keys | .[]' |
Expand Down
9 changes: 4 additions & 5 deletions modules/bins/bin/open
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
if test -n "$SSH_TTY"; then
echo "$@" | nc -c -w1 localhost 2226
echo "$@" | nc -c -w1 localhost 2226
else
# shellcheck disable=SC2086
/usr/bin/open $*
# shellcheck disable=SC2086
/usr/bin/open $*
fi

9 changes: 4 additions & 5 deletions modules/bins/bin/pbcopy
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
if test -n "$SSH_TTY"; then
nc -c -w1 localhost 2224
nc -c -w1 localhost 2224
elif test "$(uname)" = Darwin; then
/usr/bin/pbcopy
/usr/bin/pbcopy
else
xsel --clipboard --input
xsel --clipboard --input
fi

9 changes: 4 additions & 5 deletions modules/bins/bin/pbpaste
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
if test -n "$SSH_TTY"; then
nc -w1 -c localhost 2225
nc -w1 -c localhost 2225
elif test "$(uname)" = Darwin; then
/usr/bin/pbpaste
/usr/bin/pbpaste
else
xsel --clipboard --output
xsel --clipboard --output
fi

0 comments on commit 43ddb85

Please sign in to comment.