Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done pathname completion starting from ~

(1st post edited to reflect a reporting error. As Charles says, ~\Down<tab> can be completed. But with forward slash as a path separator, it cannot.)

It's nice that ~ can stand for one's home directory. And it's great that forward slash is generally usable as a path separator. Nicer yet would be if the combination was recognized by the pathname completion feature so that typing ~/Downl<tab> could expand just as if it had been /Users/Somebody/Downl<tab> .
 
Last edited:
It's nice that ~ can stand for one's home directory. Nicer yet would be if it was recognized by the pathname completion feature so that typing ~\Downl<tab> could expand just as if it had been \Users\Somebody\Downl<tab> .

It already works that way....
 
I use the CD command from the 4Utils plugin, instead of the internal CD command.

Maybe @vefatica can offer a solution.

Joe
 
It already works that way....
Same here, exactly as @LarryBrasfield said. I wonder if there are INI directives which are necessary or which will thwart it.

There are also directory aliases and drive letter substitutions which can speed up moving around the file system. I have these.

Code:
v:\> alias *:
hist:=d:\data\tcchistory
libs:=d:\data\tcclibrary
home:=c:\Users\vefatica
plug:=d:\data\tccplugins
favs:=c:\Users\vefatica\Favorites
dt:=c:\Users\vefatica\Desktop
docs:=c:\users\vefatica\documents

v:\> subst
P:\: => D:\Projects2022
S:\: => C:\Windows\system32
T:\: => C:\Users\vefatica\AppData\Local\Temp
U:\: => D:\uty
V:\: => D:\work
 
Same here, exactly as @LarryBrasfield said. I wonder if there are INI directives which are necessary or which will thwart it.

I just tried running TCC in safe mode (/I startup option) and tab expansion still handles paths starting with ~\ as expected.

However, tab expansion doesn't seem to recognize ~ alone. Looks like you need the backslash.

There are also directory aliases and drive letter substitutions which can speed up moving around the file system. I have these.

Code:
v:\> alias *:
hist:=d:\data\tcchistory
libs:=d:\data\tcclibrary
home:=c:\Users\vefatica
plug:=d:\data\tccplugins
favs:=c:\Users\vefatica\Favorites
dt:=c:\Users\vefatica\Desktop
docs:=c:\users\vefatica\documents
[/QUOTE]

You can also use variables and functions in directory aliases.  They will be expanded when the alias is evaluated.  This can come in handy if, for example, you have multiple logins:

[code]desk:=%@shfolder[16]\
dl:=%userprofile\downloads\
docs:=%@shfolder[5]\
gd:=%userprofile\google drive\
progs:=%@shfolder[38]\
shell:=%@path[%_cmdspec]
user:=%userprofile\
...
 
I have added support for ~/ tab completion, provided UnixPaths is enabled.
That's great. For those of us who are doing cross-platform work, having forward-slash as a fully-usable path separator is a real benefit. (And "fully-usable" means with the completions that TCC and other great shells support.)

That may seem silly to those whose muscle-memory has back-slash immediately available without thought, but it's a continuing trip-up when coming from non-Windows environments.
 

Similar threads

Back
Top