Skip to content

Commit

Permalink
bin: use usr/bin/env to spawn processes
Browse files Browse the repository at this point in the history
Did some experimentation with NixOS and it needs to use `usr/bin/env`
instead of e.g. `/bin/bash`.
  • Loading branch information
Granddave committed Jan 9, 2024
1 parent e90d79d commit 096f632
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bin/bin/edit-in-vim.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Edit text fields in Neovim by selecting and copy the text followed by
# triggering a shortcut to run this script.
Expand Down
4 changes: 2 additions & 2 deletions bin/bin/snippets.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Snippet tool that adds text from either script output or plain files to the
# clipboard and pastes it with Shift+Insert.
Expand All @@ -8,7 +8,7 @@
#
# Example of a executable snippet:
#
# #!/bin/sh
# #!/usr/bin/env sh
# printf '%s' "$(date '+%F')"

set -e
Expand Down
2 changes: 1 addition & 1 deletion bin/bin/start-clangd.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

CLANGD="$HOME/.local/share/nvim/lsp_servers/clangd/clangd/bin/clangd"
PORT=4444
Expand Down
2 changes: 1 addition & 1 deletion bin/bin/weather.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

{
response=$(/usr/bin/curl --silent --fail --connect-timeout 3 "wttr.in/Jonkoping?format=%C+%t")
Expand Down
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -ex

Expand Down
4 changes: 2 additions & 2 deletions nvim/.config/nvim/lua/custom/lazy/dap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ return {

dap.adapters.python = {
type = "executable",
command = "/usr/bin/python3", --'path/to/virtualenvs/debugpy/bin/python'
command = "/usr/bin/env python3", --'path/to/virtualenvs/debugpy/bin/python'
args = { "-m", "debugpy.adapter" },
}
dap.configurations.python = {
Expand All @@ -50,7 +50,7 @@ return {
elseif vim.fn.executable(cwd .. "/.venv/bin/python3") == 1 then
return cwd .. "/.venv/bin/python3"
else
return "/usr/bin/python3"
return "/usr/bin/env python3"
end
end,
},
Expand Down
2 changes: 1 addition & 1 deletion tmux/.tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix

set-option -g default-command /bin/zsh
set-option -g default-command "/usr/bin/env zsh"

# History buffer limit. Default 2000
set-option -g history-limit 100000
Expand Down

0 comments on commit 096f632

Please sign in to comment.