SmartDirectory
Inherits Reference < Object
outputs commands on STDERR, outputs text on STDOUT
Constructors
new
SourceInstance methods
cd_if_locked
Sourcecd_to(path : String, track : Bool = true)
Sourcecreate_shortcut(name : String, dir : String)
Sourcedelete_shortcut(name : String)
Sourcedisable_lock
Sourceexecute(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:
- run sd_bin
- print the stdout to the screen
- eval STDERR This is all done inside sd.* files.
history_step(amount)
Sourceprint_shortcuts
Source