class

SmartDirectory

Inherits Reference < Object

outputs commands on STDERR, outputs text on STDOUT

Constructors

Instance methods

cd_if_locked
Source
cd_to(path : String, track : Bool = true)
Source
create_shortcut(name : String, dir : String)
Source
delete_shortcut(name : String)
Source
disable_lock
Source
enable_lock(location : String)

This function is invoked when the lock flag is recieved.

Source
execute(cmd : String)

Normal methods of executing a shell command all happen within a subshell. Thus, the only way to actually execute a command inside the invoking shell is to run eval $(program) in their shell. As a result of this limitation, sd is rather contrived. This program (the binary), when executed, prints the command it wishes to run in the invoking shell through STDERR, and normal output through STDOUT. Then, a function which is defined or sourced from the user's bashrc, config.fish, or equivalent, is created which does the following:

  1. run sd_bin
  2. print the stdout to the screen
  3. eval STDERR This is all done inside sd.* files.
Source
history_step(amount)
Source
set_default(directory : String)

This function is invoked when the default flag is recieved.

Source