Partially fix z -x command#159
Partially fix z -x command#159DannyNemer wants to merge 1 commit intorupa:masterfrom DannyNemer:patch-2
z -x command#159Conversation
Previously, on OS X, the command `sed -i -e` was used incorrectly and made a backup file named ".ze". Using `sed -i ''` prevents this backup file from being created (on OS X). Previously, after running `z -x`, the datafile would be printed as if `z` failed to find results for a query. But, because `z -x` would never be used with args (i.e., a query), it is best to `return` like the `-h` command. However, the `z -x` still does not work because of `precmd`, which adds the current directory to the datafile after every `z` run regardless of the arguments. `z -x` correctly modifies the datafile, but after, `z` add the current directory back.
|
Can this be closed? This PR says that the branch is up-to-date with the base branch. |
|
@bean5 No. That message does not mean the PR has been merged; rather, it means there have not been any changes to the base branch that conflict with this PR. |
|
I see. So no rebase or merge necessary. Good to know. Thanks. |
|
@bean5 Not quite. This PR's changes have not been integrated and still need to be merged to take effect. The message means there will be no merge conflicts when the PR is merged. There will be changes, just not merge conflicts. |
|
*no rebase or merge necessary into the request branch. |
|
For me it was the Bash |
This feature is tacked on to begin with, the point of maybe some more arguments about why it's important to have this feature that can't be solved some more cromulent way would help |
|
@rupa My problem was that I have a directory which I Oh, I suppose I should moderate this minor complaint with my thanks - |
The command
z -xstill does not work, despite the change in #125.Previously, the command
sed -i -ewas used (incorrectly) and made a backup file named~/.ze. Usingsed -i ''prevents this backup file from being created (on OS X).Previously, after running
z -x, the datafile would be printed as ifzfailed to find results for a query. But, becausez -xwould never be used with arguments (i.e., a query), it is best toreturnlike thez -hcommand.Despite my attempt at a fix,
z -xstill does not work because ofprecmd, which adds the current directory to the datafile after everyzrun regardless of the arguments.z -xcorrectly modifies the datafile, but after,zadds the current directory right back (with a reset score).