LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-28-2024, 03:20 PM   #1
heifi
LQ Newbie
 
Registered: Feb 2024
Posts: 2

Rep: Reputation: 1
zsh - don't remove trailing slash on tab completion completion


Hi there,

I recently switched from bash to zsh and there are some behaviors that really drive me insane.
Most of them I could fix with enough googling, but there is one I can't seem to find the answer to:

If I tab complete the command: `cd /path/to/directory/`
It actually removes the last "/" on enter, resulting in: `cd /path/to/directory`

This is especially disturbing for rsync commands, where the two variants mean two totally different things ...

I thought, I found the answer here: https://grml.org/zsh/zsh-lovers.html
"If you end up using a directory as argument, this will remove the trailing slash (useful in ln)"
```
zstyle ':completion:*' squeeze-slashes true
```

So I tried `zstyle ':completion:*' squeeze-slashes false`, but it doesn't seem to change anything.

Thanks for your help.
 
Old 02-28-2024, 04:05 PM   #2
heifi
LQ Newbie
 
Registered: Feb 2024
Posts: 2

Original Poster
Rep: Reputation: 1
I finally found the answer:

setopt no_auto_remove_slash

Actually quite simple if you know what you are searching for.
However I leave the question in place for the next one who searches for it.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] zsh - extend zsh completion blueray Linux - Newbie 1 10-17-2020 02:44 AM
[SOLVED] Zsh auto suggestion and tab completion bstaletic Linux - Software 2 06-02-2014 11:54 AM
Necessary trailing slash in apache directories silversky Linux - Software 3 03-03-2004 03:19 AM
Apache2 Trailing Slash Problem xwastedmindx Linux - Software 6 10-20-2003 08:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration