Hi,
I was just wondering if this is possible. A feature to go to particular directory using one click. There can be a bookmarks menu where users can add paths. When user click one of the paths / shortcuts in the menu, coreshell can execute cd /path/in/the/shortcut/
which comes really handy in some situations.
Beat Regards,
Alfred
You’re in a text terminal, better to define aliases to do that.
What you're describing sounds similar to the shortcuts bar in the Transmit SFTP client. It works great there because folders are a thing SFTP interacts with directly.
An SSH client is different though — you're basically asking for buttons to inject commands into the shell. I'm not sure that's a good road for an SSH client to go down. If I click the button when I'm in vi then goodness only knows what will happen as that file path suddenly becomes a stream of commands — two ds in a row in the file path and I lose a line of text, the string 55dd loses me 55 lines!
The problem is real, but I would advise a shell-like solution to a shell problem.
Aliases are one way to go as has already been suggested, but I prefer to define environment variables — that way I can't just use them in the cd command, but in any command, e.g. vi $nginxconf.d/mysite.conf
As with everything shell, the correct file to define your variables in varies from shell to shell, but I use ~/.zshenv since I'm a ZSH user, and the syntax is very simple:
export myName=/some/path
The above create a variable $myName with the value /some/path, so you can do things like cd $myName