This commit removes the banner displayed on Eshell launch. I will
maybe do something with it one day similar to my fish_greeting
function for the fish shell.
The git prompt now also separates the current path in half if we are
in a git repository: the path up to the repository, the git prompt,
and then the relative path to the repo is are shown in that order.
To achieve that, `phundrak/is-dir-a-git-repo' has been modified to
return either the path to the git repo or `nil'.
This commit adds to my configuration the Swift layer from Spacemacs, as
well as ob-swift for evaluating Swift code in org-mode –because
apparently it is not part of the layer itself.
The keybinding to `wttrin' is also modified to `SPC o a W', with its
original keybinding `SPC o a w' set to `helm-man-woman', a helm
interface to Emacs’ `woman'.
Update eshell aliases
I should replace this file later with some Elisp code in the user init
to read aliases from Fish abbreviations.
Something good would be to try to write some Elisp code to emulate Fish
abbreviations, but I have to find what hook or function is called when a
new character is entered in the shell that triggers autocompletion. Code
in this package might help:
https://github.com/szermatt/emacs-bash-completion
`if's that had one branch are replaced with `when', and `if's which only
actual branch is the else branch are replaced by `unless'.
`phundrak/eshell-git-status' no longer verifies whether its `$path'
argument points to a git repository, that is now the role of the callee.
`phundrak/eshell-prompt' now makes use of more variables to make the
code more readable.
Some documentation is now formatted correctly
This commit fixes the removal of the `~' character (it needed to be
escaped), add commas and backslashes to the list of characters to be
removed, and updates some `CUSTOM_ID' heading properties accordingly
This commit renames `eshell/my-prompt' to `phundrak/eshell-prompt'.
`phundrak/abbr-pwd' is now simplified, and it is no longer responsible
for fetching the current path which must now be passed as its first
argument. It will also reject any argument which is neither a string
(should be the only type to be passed for public use) nor a list (for
internal usage).