Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install using apt repository doesn't work for fish shell #20285

Open
1 task done
AyushSehrawat opened this issue Jun 24, 2024 · 8 comments
Open
1 task done

Install using apt repository doesn't work for fish shell #20285

AyushSehrawat opened this issue Jun 24, 2024 · 8 comments
Labels
status/triage Needs triage

Comments

@AyushSehrawat
Copy link

AyushSehrawat commented Jun 24, 2024

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Other

Description

The [Install using the apt repository](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository) section in documentations shows the commands to add docker repository to apt. Issue is that fish shell doesn't support $(...) syntax and gives error

image

Location

https://docs.docker.com/engine/install/ubuntu/

Suggestion

This can be solved by adding other shell tabs like for fish or bash can be forced to run on that single line using bash -c or just a mention to use bash -c in case using other shells

More than happy to make a pr for it :)

@AyushSehrawat AyushSehrawat added the status/triage Needs triage label Jun 24, 2024
@dvdksn
Copy link
Contributor

dvdksn commented Jun 24, 2024

@thaJeztah you're a fish user right?

@thaJeztah
Copy link
Member

I am; also enough of a Fish user to know that it's not very compatible with POSIX shells, and I usually don't expect such examples to be working without some changes 😅

I didn't try this one on Fish though, as my remote Linux machines tend to be a vanilla install without custom shell.

Not sure we should add a "bash -c" around the whole command to make it work with an incompatible shell (not sure if there's a good solution for this line that would work for both though)

we should document our conventions for examples to expect a posix(y) shells though.

@AyushSehrawat
Copy link
Author

I am; also enough of a Fish user to know that it's not very compatible with POSIX shells, and I usually don't expect such examples to be working without some changes 😅

I didn't try this one on Fish though, as my remote Linux machines tend to be a vanilla install without custom shell.

Not sure we should add a "bash -c" around the whole command to make it work with an incompatible shell (not sure if there's a good solution for this line that would work for both though)

we should document our conventions for examples to expect a posix(y) shells though.

Yeah Bash and fish syntax doesn't always work. How about just a mention to use bash -c if not using posix(y) shells? Like a note or something

bash -c 'command....'

@AyushSehrawat
Copy link
Author

@thaJeztah how about a notice like this?

https://cockpit-project.org/running.html#ubuntu

I was browsing through this project and found it. Something similar in documentation will be nice

@docker-robot
Copy link

docker-robot bot commented Oct 1, 2024

There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

@AyushSehrawat
Copy link
Author

/remove-lifecycle stale

@docker-robot
Copy link

docker-robot bot commented Dec 30, 2024

There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

@AyushSehrawat
Copy link
Author

/remove-lifecycle stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/triage Needs triage
Projects
None yet
Development

No branches or pull requests

3 participants