Skip to content

Conversation

@eitsupi
Copy link
Contributor

@eitsupi eitsupi commented Mar 19, 2025

I noticed that it does not appear to be the correct fish syntax.

@eitsupi eitsupi marked this pull request as ready for review March 19, 2025 14:58
@eitsupi eitsupi marked this pull request as draft March 19, 2025 14:59
@eitsupi eitsupi marked this pull request as ready for review March 19, 2025 15:14
@eitsupi
Copy link
Contributor Author

eitsupi commented Mar 20, 2025

@stuartleeks Could you take a look at this?

set history_location ~/.local/share/fish/fish_history
else
set history_location \$XDG_DATA_HOME/fish/fish_history
fi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work for you without the escaping?

I had to add the escaping back in for the bash history as otherwise the $XDG_DATA_HOME env var is evaluated at the point that oncreate.sh runs and that wasn't set Escaping it ensured that it was evaluated when the .bashrc was run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review.

IIUC, replacing EOF to "EOF" allows us to use $ without escaping here.
https://en.wikipedia.org/wiki/Here_document

But from this Wikipedia page, perhaps single quoted 'EOF' might be better?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah - I'll file that under Things I Learned 😄

In terms of single vs double quoting, I think I prefer single as the article suggests


# Feature-specific tests
check "check fish config script validity" fish -c "source $HOME/.config/fish/config.fish"
check "check fish config script content" bash -c "cat $HOME/.config/fish/config.fish | grep -q 'XDG_DATA_HOME'"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a test. I believe this test confirms that $XDG_DATA_HOME is present in the script.

@eitsupi eitsupi changed the title fix(shell-history): fix fish sytax and ensure creating the sym link fix(shell-history): fix broken fish config script Mar 20, 2025
@eitsupi
Copy link
Contributor Author

eitsupi commented Mar 23, 2025

@stuartleeks Sorry to rush you, but I think this is a critical bug and I hope you will consider merging and releasing it.

baseImage: "mcr.microsoft.com/devcontainers/base:ubuntu"
remoteUser: root
features:
- dev-tunnels
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the dev-tunnels tests are failing, can you comment out this line?

Copy link
Owner

@stuartleeks stuartleeks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once the dev-tunnels tests are removed. Thanks for the PR!

@stuartleeks stuartleeks merged commit b0d12eb into stuartleeks:main Mar 24, 2025
5 checks passed
@eitsupi eitsupi deleted the fix-fish branch March 24, 2025 22:53
@eitsupi
Copy link
Contributor Author

eitsupi commented Mar 24, 2025

Thanks for merging this!
Could you create a new release?

@stuartleeks
Copy link
Owner

shell-history 0.0.6 released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants