Skip to content

Commit

Permalink
Simple maintenance improvements (#838)
Browse files Browse the repository at this point in the history
* Remove hashbang from shell completion file

Shell completion files are sourced, not executed.

* Trim excess whitespace

* Fix typos

* chore: Update the CHANGELOG

---------

Co-authored-by: Andrew Kofink <ajkofink@gmail.com>
a1346054 and akofink authored Feb 3, 2024
1 parent b0fd453 commit c2afba0
Showing 8 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ about: Create a bug report to help us improve tmuxinator
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior.
Steps to reproduce the behavior.

**Expected behavior**
A clear and concise description of what you expected to happen.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased
### Misc
- Fix typos and remove extra whitespace

## 3.1.0
- add a FAQ entry about how long commands may be lost/corrupted by TTY typeahead
- increment thor minor version in tmuxinator.gemspec
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -87,8 +87,8 @@ Create or edit your projects with:
tmuxinator new [project]
```

Create or edit a local project where the config file will be stored in the
current working directory (in `.tmuxinator.yml`) instead of the default
Create or edit a local project where the config file will be stored in the
current working directory (in `.tmuxinator.yml`) instead of the default
project configuration file location (e.g. `~/.config/tmuxinator`):

```
@@ -136,7 +136,7 @@ root: ~/
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
# tmux_options: -f ~/.tmux.mac.conf

# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
# tmux_command: byobu

# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
@@ -373,11 +373,11 @@ tmuxinator version
## Project Configuration Location
Using environment variables, it's possible to define which directory
tmuxinator will use when creating or searching for project config
Using environment variables, it's possible to define which directory
tmuxinator will use when creating or searching for project config
files. (See [PR #511](https://github.com/tmuxinator/tmuxinator/pull/511).)
Tmuxinator will attempt to use the following locations (in this order) when
Tmuxinator will attempt to use the following locations (in this order) when
creating or searching for existing project configuration files:
- `$TMUXINATOR_CONFIG`
2 changes: 0 additions & 2 deletions completion/tmuxinator.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env bash

_tmuxinator() {
COMPREPLY=()
local word
2 changes: 1 addition & 1 deletion lib/tmuxinator/assets/sample.yml
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ root: ~/
# Pass command line options to tmux. Useful for specifying a different tmux.conf.
# tmux_options: -f ~/.tmux.mac.conf

# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
# tmux_command: byobu

# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
4 changes: 2 additions & 2 deletions lib/tmuxinator/assets/template.erb
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ cd <%= root || "." %>

# Run pre command.
<%= pre %>

# Run on_project_first_start command.
<%= hook_on_project_first_start %>

@@ -94,6 +94,6 @@ cd <%= root || "." %>
<%- end -%>

<%= post %>

# Run on_project_exit command.
<%= hook_on_project_exit %>
4 changes: 2 additions & 2 deletions lib/tmuxinator/config.rb
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ def directory
return environment if environment?
return xdg if xdg?
return home if home?
# No project directory specified or existant, default to XDG:
# No project directory specified or existent, default to XDG:
FileUtils::mkdir_p(xdg)
xdg
end
@@ -127,7 +127,7 @@ def configs
end.flatten.sort
end

# Existant directories which may contain project files
# Existent directories which may contain project files
# Listed in search order
# Used by `implode` and `list` commands
def directories
4 changes: 2 additions & 2 deletions spec/lib/tmuxinator/config_spec.rb
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@
allow(described_class).to receive(:home?).and_return false

Dir.mktmpdir do |dir|
config_parent = "#{dir}/non_existant_parent/s"
config_parent = "#{dir}/non_existent_parent/s"
allow(XDG).to receive(:[]).with("CONFIG").and_return config_parent
expect(described_class.directory).
to eq "#{config_parent}/tmuxinator"
@@ -62,7 +62,7 @@
end
end

describe "#enviroment" do
describe "#environment" do
context "environment variable $TMUXINATOR_CONFIG is not empty" do
it "is $TMUXINATOR_CONFIG" do
allow(ENV).to receive(:[]).with("TMUXINATOR_CONFIG").

0 comments on commit c2afba0

Please sign in to comment.