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

Add caveat about tab completion to episode 3 #254

Closed
wants to merge 1 commit into from

Conversation

byebrid
Copy link

@byebrid byebrid commented Feb 22, 2024

  • Not every shell's tab completion is the same. The existing description did not apply to my personal bash shell for example, which may confuse learners.
  • Add caveat to let learners know that differing behaviour is expected in some cases.
  • Wanted to suggest they review their settings later, but I think that makes the caveat too lengthy

- Not every shell's tab completion is the same. The existing description did not apply to my personal bash shell for example, which may confuse learners.
- Add caveat to let learners know that differing behaviour is expected in some cases.
- Wanted to suggest they review their settings later, but I think that makes the caveat too lengthy
Copy link

🆗 Pre-flight checks passed 😃

This pull request has been checked and contains no modified workflow files, spoofing, or invalid commits.

It should be safe to Approve and Run the workflows that need maintainer approval.

@kaitlinnewson
Copy link
Member

kaitlinnewson commented Feb 22, 2024

Hello @byebrid, thanks for the pull request! Can you provide more details about your shell - e.g. what operating system you are using and what application you are using for the shell? I'm assuming it's zsh on a Mac based on your PR but it would be great to confirm that.

@byebrid
Copy link
Author

byebrid commented Feb 22, 2024

OS: Ubuntu 22.04
Terminal: gnome terminal
Shell: bash

I do normally use oh-my-zsh, but I was using bash here. However, I can't actually replicate the behaviour I observed before so maybe I was hallucinating... I think it's not worth merging this now since I can't actually reproduce the unexpected behaviour.

What I thought I observed in my bash shell was tab not actually doing partial completion in case of non-unique filenames. E.g., with the below files in the current directory,

lex@lex-Inspiron-16-7610:~/Desktop/shell-lesson$ ls
2014-01-31_JA-africa.tsv   2014-01_JA.tsv             201403160_01_text.json  829-0.txt   firstdir
2014-01-31_JA-america.tsv  2014-02-02_JA-britain.tsv  33504-0.txt             diary.html  pg514.txt

Typing ls 2 and then pressing tab was not auto-completing to ls 2014. But now I can't reproduce this so I'm questioning my sanity. I had not modified my bashrc or profile since last trying this, and hadn't specified any extra flags when I started the bash shell (e.g. didn't set --noprofile etc.), so it's almost like my tab input wasn't even being registered at the application level, no idea.

Of course the behaviour could technically be different depending on user shell/settings but the caveat I've added does seem pointless now for a beginner's workshop.

@kaitlinnewson
Copy link
Member

Thanks @byebrid, I will go ahead and close this, but feel free to re-open if you want to discuss further.

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