Comments (6)
Ok thanks. It's the case I guessed. Clink should check whether there's an alias for cd
that expands to run something other than cd
, and if so then it shouldn't intercept at all.
Also, it should check for &
or |
after the cd blah_whatever
command, and if present then it also shouldn't intercept.
from clink.
This sounded related to something I saw with cd-deluxe in the past. I tracked down my memory to shunsambongi/clink-zoxide#5 which was opened by you, and we had a conversation there.
There isn't a way to turn off directory intercept.
Can you share what isn't working? With some information about your macros and scripts and what isn't working, it would be possible to fix the problems that they're experiencing.
from clink.
Specifically what "doesn't work"?
The only thing I can think of is that you want cd -
to be handled by your cd
alias, so that cdd -
is invoked and the "go to previous directory" is handled by CD-Deluxe instead of by Clink, so that the side effects happen such as setting %OLDPWD%
.
I think the issue is that in addition to checking for "cd"
or "chdir"
, Clink should also first confirm that there isn't a corresponding doskey macro.
Can you share what problem(s) you've encountered?
from clink.
Sorry, I had to commit some changes before replying.
This is my modified version of the cdd.cmd
script which is aliased to cd
(original is here):
@echo off
set dest=%*
if '%dest%'=='' goto :cdd
if qq%dest:~0,1%%dest:~-1%qq == qq""qq set dest=%dest:~1,-1%
if '%dest:~0,1%' == '~' set dest=%USERPROFILE%%dest:~1%
set dest="%dest%"
set OLDPWD="%CD%"
:cdd
set pushd_tmp=%TEMP%\pushd.tmp
set cdd_tmp_cmd=%TEMP%\cdd.tmp.cmd
pushd > %pushd_tmp%
%~dps0_cdd.exe %dest% < %pushd_tmp% > %cdd_tmp_cmd%
set dest=
%cdd_tmp_cmd%
The set OLDPWD="%CD%"
works in every case apart from when the original command is cd -
, where the script is bypassed altogether. (This doesn't otherwise disrupt the working of CD Deluxe
though.)
from clink.
I updated the title to describe the issue.
from clink.
Excellent, thanks.
from clink.
Related Issues (20)
- uninject / deactivate clink HOT 21
- Windows Defender reports a trojan in Clink 1.6.10 zip HOT 2
- Integration with conda HOT 2
- Way to redact secrets in logs HOT 5
- Clink command changes font HOT 2
- The system cannot find the path specified. HOT 4
- clink does not save command that prefix with space HOT 3
- [feature request] add a setting for allowing remove leading space HOT 10
- some key work in linux, but no work in clink HOT 4
- Disable startup message HOT 2
- how to use `os.setalias()` HOT 1
- How change shortcut for Popup Windows HOT 19
- prompt shows leftover text sometimes HOT 2
- Modify Heading HOT 5
- the new `os.setalias` ignore the flags and args HOT 1
- Where to define environment variables in CMD or Clink? HOT 2
- Question: Expanding environment variables during auto complete HOT 9
- some problems HOT 1
- No message print when an update is available HOT 2
- Show history filtered by the typed command HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clink.